Heroku — deployment from multiple computers?

前端 未结 4 507
情深已故
情深已故 2021-01-31 08:38

I have two computers and I want both of them to be able to pull/push from the same repo on github as well as deploy to the same app on heroku. I know that Heroku allows you to

4条回答
  •  情歌与酒
    2021-01-31 09:40

    1. Clone your app from Github on all your computers.
    2. Use ONE computer to git push heroku.
    3. All other computers add Heroku as a remote.

    So do this to all your computers where you want heroku commands:

    git remote add heroku git@heroku.com:project.git
    

    And the you can push to both Git and Heroku at the same time with these configurations:

    git remote add all github:path/proj.git
    git remote set-url --add --push all url = heroku:path/proj.git
    

    Then git push heroku will push to all.

提交回复
热议问题