Here is the .gitignore that I add to most projects.
It consists of a few things that I always want to ignore, plus a few things from github/gitignore
If you want to get this into your project you can do the following
curl https://raw.github.com/serby/GitIgnore/master/.gitignore > .gitignore
git add .gitignore
git commit -m 'Adding .gitignore from github.com/serby/GitIgnore' .gitignore