Forrest logo
back to the exa tool

exa:tldr:7339c

exa: Don't list files mentioned in `.gitignore`.
$ exa --git-ignore
try on your machine

The command "exa --git-ignore" is a specific usage of the "exa" command-line tool, which is a modern replacement for the traditional "ls" command.

The "--git-ignore" option is an argument provided to "exa" to make it show files and directories in the output while respecting the rules of the Git version control system's ".gitignore" file.

The ".gitignore" file is a configuration file where developers can specify patterns of files, directories, or even file types that they want Git to ignore and not include in version control. This is useful for preventing files like temporary files, compiled binaries, or generated files from being accidentally committed to a Git repository.

When running "exa --git-ignore", the "exa" command will list all the files and directories in the current directory based on Git's ignore rules. It will hide any files or directories that match the patterns specified in the ".gitignore" file, just as Git would when working with a repository.

Note that the "exa" command itself provides several other customization options to display file and directory information, such as colors, file sizes, file permissions, and more.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the exa tool