Git has a git check-ignore -v <pathname> option which will explain to you why a given file is ignored by the repository. This is helpful for debugging .gitignore and other exclude options.
I hope you never need this, but you’ll be glad if you do.
