I'm have two git accounts. When I am trying to register a second remote
git remote add origin git@github.com:RiyaKapuria/testing.git
git push -u origin master
During pushing to my repo I'm getting this error:
fatal: remote origin already exists
I'm have two git accounts. When I am trying to register a second remote
git remote add origin git@github.com:RiyaKapuria/testing.git
git push -u origin master
During pushing to my repo I'm getting this error:
fatal: remote origin already exists
replace origin by another name. because origin already exists. Like
git remote add upstream git@github.com:RiyaKapuria/testing.git
You already have a remote named origin (the one you cloned from). Just give the new remote a different name and you should be OK:
$ git remote add another_origin git@github.com:RiyaKapuria/testing.git
and then push to the another_origin by executing
git push -u another_origin master