How to globally ignore .DS_Store when using Git

If you don’t want OS X mucking up your Git repo with DS_Store files, you can set up a global ignore file. As per freshsauce, you simply execute the following two commands:

git config --global core.excludesfile ~/.gitignore
echo .DS_Store >> ~/.gitignore

Brilliant.

1 Comment

  1. Thanks for posting this; just found your blog searching around. Keep up the good work!

Leave your thoughts
  • You can use some HTML in your comment.
  • Your comment may not display immediately due to spam filtering. Please wait for moderation.