How to change a Git remote on Heroku

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

    1. View Remote URLs

      > git remote -v

        heroku  https://git.heroku.com/###########.git (fetch) < your Heroku Remote URL
        heroku  https://git.heroku.com/############.git (push)
        origin  https://github.com/#######/#####.git (fetch) < if you use GitHub then this is your GitHub remote URL
        origin  https://github.com/#######/#####.git (push)
    
    1. Remove Heroku remote URL

      > git remote rm heroku

    2. Set new Heroku URL

      > heroku git:remote -a ############

    And you are done.

提交回复
热议问题