How to change a Git remote on Heroku

后端 未结 7 1594
慢半拍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:42

    Assuming your current remote is named origin then:

    Delete the current remote reference with

    git remote rm origin
    

    Add the new remote

    git remote add origin 
    

    push to new domain

    git push -u origin master
    

    The -u will set this up as tracked.

提交回复
热议问题