How to fix fatal: remote origin already exists Git

fatal: remote origin already exists.

How to fix ‘fatal: remote origin already exists’ Git error
fatal: remote origin already exists

When you try to add a origin by using:

git remote add origin 'YOUR-ORIGIN-URL'

Most of times it works but sometimes it says

fatal: remote origin already exists.

because the origin was already there and you added multiple times by mistake. So to avoid this problem you need check what origins are there first by using

git remote -v

We will see all origins in your git local repository if you find doubles or single but not working and still same issue then try below solution.


git remote remove origin

It will remove all origins from your local git repository then you can add origin again using

git remote add origin 'YOUR-ORIGIN-URL'

It will be resolved Happy coding 😎

You can reach me out at

Find more solutions and some useful projects / codes here or at ITcians


No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *