Git servers for your project are saved as "remotes".
The default remote is usually called origin
. You can have more than one, but all your remotes must have unique names.
The error you get is telling you that you already have a remote called origin
configured. To know what remotes are configured for your local project, type git remote
(or git remote -v
for a more detailed view).
To remove your default remote, type
git remote rm origin
Then you will be able to add a new remote just as you were trying to, with
git remote add origin https://my/git/origin.git
However, I advice adding a new remote with a different name and then setting it as the default upstream. This way you could always come back and then, for example, git rebase origin master
to keep your repo in sync with the original source.
git remote add mynewremote
git push -u mynewremote master