Today I learned about global .gitgnore files.

According to git docs this is configured with the core.excludesfile.

To see if this is set:

git config --get core.excludesfile

If so, any pattern in that file will be globally applied. Unfortunately, I didn't check that before monkeying with things, so I have no idea if I've changed my system accidentally.

From the docs (which I finally found and read):

Patterns which a user wants Git to ignore in all situations (e.g., backup or temporary files generated by the user’s editor of choice) generally go into a file specified by core.excludesFile in the user’s ~/.gitconfig. Its default value is $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore is used instead.

On my system:

So I think this means that I had no previously-configured global ignore patterns? Maybe???

In any event, I've now created $HOME/.config/git/ignore and configured git to specifically use it:

git config --global core.excludesfile $HOME/.config/git/ignore

I'll find out in the coming days if new files start showing up in my various repos when I run git status. 🤷