General Purpose .gitignore file
Don't you hate those .DS_Store or Thumbs.db files that made it to your git repo? how about project files, log files, and compiled binaries? Here's the .gitignore file I used to exclude most of those files.
This .gitignore file excludes files for OS X, Windows, Eclipse, Visual Studio, Xcode, RoR, Java and Android development.