Comment by saghm

20 hours ago

I only realized very recently that being able to specify .gitignore files in any part of a repo can be combined with wildcards to just put `.gitignore` with `*` in a arbitrary directories to make them get ignored without needing to modify any wider configuration.

I'm doing that all the time. Starting with a .vim directory that contains vim-specific files, such as scripts / build commands to be run on certain key combinations, to ".misc" / ".scratch" / ".notes" / ".api-keys" directories... I wouldn't want to list them all in my global .gitignore because I'd certainly forget half of the names I tend to give to these...