How can I upload my application to github but remove sensitive authorization information?

后端 未结 3 792
隐瞒了意图╮
隐瞒了意图╮ 2021-01-20 05:48

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.

<
3条回答
  •  臣服心动
    2021-01-20 06:13

    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.

提交回复
热议问题