Computer And You

How to solve: fatal: remote origin already exists

Posted In How To, Linux - By Abhishek Prakash on Tuesday, June 7th, 2011 With 16 Comments

Problem:

I have started working on git lately. An extremely organised way of version control. Since I am new with git, I keep messing with small things. One of the problem which I encountered was to get the following error:

fatal: remote origin already exists

when I am trying to run the following command:

git remote add origin git@gitserver.com:me/project.git

Reason:

Reason is explained in the error itself. Remote origin already exists i.e. its already been added.

Solution:

The way to solve it is to remove the origin previously added. Use the following command:

git remote rm origin

Hope it solved your problem also. Question, suggestions and feedback are welcomed. Enjoy :)

About - is founder of Computer And You. He takes a keen interest in day-to-day computer life and wishes to share his experience with others to make their computer experience better and easier. He is also a regular Linux author at Make Tech Easier.

  • Bhaskar

    That is so simple yet so helpful..thanks

    • http://www.computerandyou.net/ Abhishek Prakash

      You are welcome Bhaskar

  • Eliot Arntz

    Thanks for your help!

    • http://www.computerandyou.net/ Abhishek Prakash

      You are welcome Eliot

  • http://twitter.com/DMWoodall Dave Woodall (@DMWoodall)

    This post was so easy to follow that I’ll use the time I planned on research to write a comment….

    Thank you!

    • http://www.computerandyou.net/ Abhishek Prakash

      Glad you find it helpful.

  • namrata chauhan

    Thank you for the solution
    it worked for me

    • http://computerandu.wordpress.com Abhishek Prakash Chaturvedi

      You are welcome..

  • http://itankur.wordpress.com AnkurG

    Thanks a lot! That solved it. I was going gaga a minute ago.

    • http://computerandu.wordpress.com Abhishek Prakash Chaturvedi

      You are welcome Ankur..

  • http://gravatar.com/esjaydee sdesapio

    Thank you!

    • http://computerandu.wordpress.com Abhishek Prakash Chaturvedi

      You are welcome…

  • http://abaltazar.org Alpha01

    This solved my problem :-)

    • http://computerandu.wordpress.com Abhishek Prakash Chaturvedi

      :)

  • http://meshfields.de nottinhill

    Thanks for this! I dented you.
    [trackback..] http://identi.ca/notice/80610976 [/trackback]

    • http://computerandu.wordpress.com Abhishek Prakash Chaturvedi

      You are welcome