I have over 100 git repositories on my Mac, and for almost every one, I sometimes browse the directory structure in the Finder. Once I do that, I inevitably end up with a few pesky
.DS_Store files that want to be added to my repo:
.DS_Store files don't add anything of value to my code (they just tell Mac OS X about folder display and icons), so I always end up adding them to my own projects'
.gitignore files. But when I'm working on other repositories (like Drupal, or a fork from GitHub) I don't want to add a
.gitignore if none exists, or mess with the project's existing
.gitignore. So what's a coder to do?
There are a couple good solutions: