Heroku: How do you push to specific app if you have multiple apps in heroku?

后端 未结 1 1350
借酒劲吻你
借酒劲吻你 2021-01-05 05:29

I create a new heroku app using heroku create test-app3. Now if I want to push some code to this new test-app3, how do I do that?

When I t

1条回答
  •  太阳男子
    2021-01-05 06:03

    You will need to setup different git remote end points for each application at Heroku so you can push to either application from the one local repo.

    Get the GIT URLs for your apps on Heroku via the dashboard (it will look something similar to this: git@heroku.com:your_app_name.git) and do:

    git remote add test-app1 git@heroku.com:test-app1.git
    
    git remote add test-app2 git@heroku.com:test-app2.git
    
    git remote add test-app3 git@heroku.com:test-app3.git
    

    Then you will be able to push to any specific app like this:

    git push test-app1 master
    
    git push test-app2 master
    
    git push test-app3 master
    

    0 讨论(0)
提交回复
热议问题