I have a Ruby on Rails application that I am trying to host on Heroku. I would also like to use a GitHub public (free) repository to track changes. I need to check-in a file containing passwords to the Heroku remote repo, but ignore the file so I don't check it in to GitHub. Is there a way I can add the file to one repo, and ignore it from another?
Update: I figured out how to solve my immediate problem of storing passwords in Heroku by using Heroku Config vars. However, I'm still interested in the concept of pushing a file to only specified repos.
As VonC mentioned, the best (and least error-prone) bet is to keep sensitive config info out of Git and put them in environment variables on your server. Here are instructions for how to do so on Heroku:
http://docs.heroku.com/config-vars
See also the linked questions.
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