What is a good .gitignore to use with Rails on Heroku?
*.log
*.sqlite3
what else?
What is a good .gitignore to use with Rails on Heroku?
*.log
*.sqlite3
what else?
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.
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).