logoalt Hacker News

Zambyteyesterday at 4:37 PM4 repliesview on HN

You can just add it in a user-level gitignore instead of ignoring it in every repo. See: ~/.config/git/ignore


Replies

saghmyesterday at 4:42 PM

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.

zelphirkaltyesterday at 8:50 PM

This has the disadvantage though, that this user level gitignore file will not be in the repo, which means that other less careful contributors have to fix ignoribg for themselves.

mckee_plus_plustoday at 12:04 AM

And then you have a known path to script up all your repos' stuff for backup

der_gopheryesterday at 6:18 PM

yes, but user level is not a repo level

show 1 reply