I would use ls-files
:
git ls-files -i --exclude-standard
This shows committed files that would be ignored by standard git rules (i.e. according to .git/info/exclude
, .gitignore
in each directory, and the user’s global exclusion file).
If you want to test a particular ignore file, you can use the -X
parameter to specify the file:
git ls-files -i -X .\.gitignore