Creating a Global
For quite some time, my Git config has had the following entry:
[core] excludesfile = /home/jamie/.gitignore_global
This allows me to globally set patterns that I don't want to see anywhere, ever, such as my git worktrees.
But it turns out that Git actually has a default location for your
gitignores, located in
~/.config/git/ignore, which means you don't even need that configuration to be set!