How to change a Git remote on Heroku

后端 未结 7 1495
慢半拍i
慢半拍i 2020-12-22 15:10

I do not want to upload my app to the wrong domain.

How can I change the git master branch on git?

7条回答
  •  有刺的猬
    2020-12-22 15:46

    If you're working on the heroku remote (default):

    heroku git:remote -a [app name]
    

    If you want to specify a different remote, use the -r argument:

    heroku git:remote -a [app name] -r [remote] 
    

    EDIT: thanks to Алексей Володько For pointing it out that there's no need to delete the old remote.

提交回复
热议问题