Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

*.log   *.sqlite3 

what else?

like image 309
Victor Avatar asked Mar 30 '10 01:03

Victor


People also ask

What would you use a .gitignore file for?

gitignore file tells Git which files to ignore when committing your project to the GitHub repository. gitignore is located in the root directory of your repo. / will ignore directories with the name.

How do I deploy heroku with an existing Git repository?

To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.


1 Answers

This is pretty similar to: 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/**/* 

This 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.

like image 88
Dan McNevin Avatar answered Sep 19 '22 06:09

Dan McNevin