tags:

views:

74

answers:

3

I want to upload my app to github so I can share portions of it for feedback and help...but it contains information used for logging into other services and so forth.

How do I upload it into github without making it difficult to continue to use that repository for deploying into heroku?

A: 

If you want to keep your configs stored in the git repo you can use branching. First, make sure the sensitive information is removed from the repo's history. Then you go to your main branch (master) and create a new branch off it called heroku. You put your configs into the heroku branch and keep that branch local. You never push it to github. Whenever you want to deploy, you checkout the heroku branch, merge in the master changes and push to heroku.

igorw
thanks -- how do I remove sensitive information from the history?
Angela
Take a look at interactive rebasing.
igorw
Isn't it a bit late if the information is already in the repository? (that is, at least if you've pushed it to the central/public one)
Lasse V. Karlsen
it hasn't been pushed into the public one...but even if it were to do a git rm now...it would still be in there in the past commits....
Angela
A: 

On Heroku you can use config vars to store configuration information.

http://docs.heroku.com/config-vars

This will keep it out of your repository.

David Dollar
A: 

I found by far the easiest way to handle this is to just change your passwords and API keys. Far easier than scouring your repo and re-writing its history to expunge any sensitive data. Just changing your creds is a much more surefire way. Of course don't commit the new info.

tfe