Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error : remote gerrit already exists

Tags:

gerrit

I am trying to add remote gerrit but I am getting the error as :

fatal: remote gerrit already exists.

how to remove existing gerrit?

like image 362
sam Avatar asked Oct 31 '25 13:10

sam


2 Answers

You didn't list what command was causing this error output, but I assume it was something like:

git remote add gerrit <url>

If you already have a remote named gerrit, you will get this error. You can see what remotes are in your repository with

git remote -v

To remove a remote, use

git remote rm <name>

name is 'gerrit' in your case.

like image 100
Brad Avatar answered Nov 03 '25 21:11

Brad


A remote which name "gerrit" already exists. You can find it by:

git remote -v

So, remove this old remote:

git remote rm gerrit

Then add it again:

git remote add gerrit <url>

like image 43
jack guan Avatar answered Nov 03 '25 21:11

jack guan