Menu

Dipesh Majumdar

Blog and Paintings

adding git origin over command line (& faced with - fatal: remote origin already exists.)

dipes@LAPTOP-FEA1CJ5Q MINGW64 ~/gitlab_mz_content/someproject (master)
$ git remote add origin git@gitlab-domain-name.com:TamTam/someproject.git
fatal: remote origin already exists.

 

for the above error you need to remove origin and then add it... 

 

dipes@LAPTOP-FEA1CJ5Q MINGW64 ~/gitlab_mz_content/someproject (master)
$ git remote rm origin

dipes@LAPTOP-FEA1CJ5Q MINGW64 ~/gitlab_mz_content/someproject (master)
$ git remote add origin git@gitlab-domain-name.com:somegroup/someproject.git

dipes@LAPTOP-FEA1CJ5Q MINGW64 ~/gitlab_mz_content/someproject (master)
$ git remote -v
origin  git@gitlab-domain-name.com:somegroup/someprojecct.git (fetch)
origin  git@gitlab-domain-name.com:somegroup/someproject.git (push)

dipes@LAPTOP-FEA1CJ5Q MINGW64 ~/gitlab_mz_content/someproject (master)
$

Go Back

Comment