views:

516

answers:

2

What is a good .gitignore to use with Rails on Heroku?

*.log  
*.sqlite3

what else?

+5  A: 

This is pretty similar to: http://stackoverflow.com/questions/1969393/rails-exclude-anything-from-version-control Here is my answer from that.

DHH just posted on Twitter that there will be a default .gitignore in Rails 3, which includes:

db/*.sqlite3
log/*.log
tmp/**/*

Which is usually what I exclude, some people also like to exclude the database.yml file if it's going on a public repo and you don't want to expose your database passwords.

Dan McNevin
+2  A: 

Keep in mind that Heroku's slug compiler has a very similar feature using a file named .slugignore. This file syntax is roughly the same as in .gitignore.

So you can continue working as usual (ie: storing PSD files, spreadsheets and other common files) but remove them at runtime on Heroku to lower the slug's size (< 20MB sounds good).

Cesario