I've been using Git for so long and I just realized you can ignore files at three different levels and not just with .gitignore. The three files you can use to ignore files are:

.gitignore

.git/info/exclude

~/.config/git/ignore

.gitignore