Use global .gitignore to ignore files in all your repositories

Somehow I only just found out today that you can use a global .gitignore file to list files which you want to be ignored for all git repositories on your computer. It can be found (or created) at ~/.gitignore_global

It’s useful for ignoring system files like .DS_Store which you never want in any of your repos.

Note: if you’re collaborating with other developers your global git ignore won’t stop them commiting these files from their computer, so you may still want to keep these in your project’s .gitignore.

More info on Github’s site »

Tagged code