Adding a new GIT remote when one already exists

In the following workflow:

git remote add origin https://[email protected]/repo/app.git

You might encounter this error:

fatal: remote origin already exists.

Do this:
git remote set-url origin [email protected]: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 *

Scroll to Top