This may be technically correct, and I do have .DS_Store in my global, but I also put it in projects, because I know not everyone on my team is going to do that. I add it to the .gitignore in projects to save me from other people junking up the project. It’s a lot easier to add some lines to a file than it is to micromanage the global file for every potential future contributor.
Enough to teach people to use a global git core.excludesfile, IMO.
Same place you should put rules for Emacs / Vim swap files.
Totally correct. Files which are unrelated to the project don't belong in .gitignore.
This may be technically correct, and I do have .DS_Store in my global, but I also put it in projects, because I know not everyone on my team is going to do that. I add it to the .gitignore in projects to save me from other people junking up the project. It’s a lot easier to add some lines to a file than it is to micromanage the global file for every potential future contributor.
3 replies →
It makes sense to add an ignore for .* though and then specifically unignore only those dotfiles/directories that you actully want checked in.
or just ignore them globally once.