What is a good .gitignore to use with Rails on Heroku?
*.log *.sqlite3
what else?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With