fatal: remote origin already exists issue bitbucket

How to fix the issue "fatal: remote origin already exists" bitbucket:


Generally this issue comes when already a git remote url is added and now again someone trying to add the new git url like:

git remote add origin https://study@bitbucket.org/tutorial/gofood.git

So to fix run the command:

git remote set-url origin https://study@bitbucket.org/tutorial/gofood.git

Comments