How to solve: fatal: remote origin already exists

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 [email protected]
: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 :)