Fatal: remote origin already exists

Luis@DESKTOP-D6OLHRV MINGW64 ~/git_practice (master)
$ git remote add origin https://github.com/lrig3966/lrig_gitpractice.git
fatal: remote origin already exists.

Luis@DESKTOP-D6OLHRV MINGW64 ~/git_practice (master)
$ git push -u origin master

Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 229 bytes | 114.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/lrig3966/lrig_gitpractice.git

  • [new branch] master -> master
    Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.

Luis@DESKTOP-D6OLHRV MINGW64 ~/git_practice (master)
$

Luis@DESKTOP-D6OLHRV MINGW64 ~/git_practice (master)

did i successfully do the remote repository thing??

1 Like

As the error message indicates, there is already a remote configured with the same name.

So you do

$ git remote set-url origin https://github.com/lrig3966/lrig_gitpractice.git

seems to be the case, you can check with:

git log

to see the commits, otherwise check the repository on github website.

1 Like