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.

Useful Git config on Mac OS X

[From Git Configuration by Arthur Koziel] The two most useful that I was unaware of:

TextMate as the default editor:

git config --global core.editor "mate -w"

Opendiff (FileMerge) to resolve merge conflicts:

git config --global merge.tool opendiff