Ignoring files is a great article on GitHub Help. The global gitignore file is mentioned there. In this file you can ignore files in all the git repositories on your machine. There is a very helpful template that will ignore compiled output files from various languages (
*.o, *.so, *.dll, *.class) as well as logs, database files, packages and also files generated by the operating system (Yes, I’m looking at you Windows
Thumbs.db and Mac
The above page also links to the gitignore repository on github. This repo contains a whole bunch of gitignore files for programming languages, build systems, servers, markup languages, content management systems, … There is also a global folder for more your global ignore file (IDEs, text editors, non-git version control, operating systems…).