Rails which files to ignore for GIT

I created a GIT repo, locally. I now see a bunch of files i rather ignore for GIT check-in. This brings me to the question: is there any default .gitignore for Rails? Any best practices?

I think of tmp and log for sure. But are there any other files or folders i should consider?


Github has sample .gitignore files for almost any kind of project known to humanity.

Check out the repo: https://github.com/github/gitignore


this is a gitignore from a relatively large Rails 3.2 app (created with Rails 3.1)

/.bundle
/db/*.sqlite3
/log/*.log
/tmp
config/database.yml
config/google_analytics.yml
.DS_Store
/nbproject/
public/assets/**

just the basic gitignore which comes with rails and added some developer specific stuff like Netbeans project stuff, the .DS_Store from OS X

and we don't like passwords in our repository, so we add all yml files with passwords to gitignore

we also added public/assets/** since we deploy our apps with capistrano and generate the assets during the deploy and push them to amazon