Ready to commit, you fire your git status
and you don’t see your files 🤔.
Use this command to ask Git what rule is causing this ignore:
$ git check-ignore -v filename
For instance to see what rule ignores tests.pyc:
$ git check-ignore -v tests.pyc
.gitignore:1:*.pyc tests.pyc
Here we see it’s the first line of the .gitignore file that is in effect.
You can also use git status --ignored
to show the files being ignored.