Adding a new GIT remote when one already exists

In the following workflow:

git remote add origin https://user@bitbucket.org/repo/app.git

You might encounter this error:

fatal: remote origin already exists.

Do this:
git remote set-url origin git@github.com:repo/app.git

Reference:
https://stackoverflow.com/questions/10904339/github-fatal-remote-origin-already-exists

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *