GIT Error Fatal: remote origin already exists (and how to fix it quickly!)

Welcome to the ultimate tutorial on how to fix remote origin already exists error! In this quick git tutorial I’ll show you the command you can execute for fixing this error quickly!

Ghost Together
Oct 15, 2022
How to fix git error fatal remote origin already exists
Just watch this git error fatal video to help you fix this issue!

So this error happens when you’ve already linked your local repo to a remote URL on github. Now you want to change it so you can start committing elsewhere right? (Or original remote changed location.)

So you ran this command.

git remote add origin https://github.com/username/project.git

But you received the git error fatal remote origin already exists error

Right? Well…………………………………………………..right?

Is that really what happened?…………Be honest.

So what is the solution?

Instead of add, use set-url:

git remote set-url origin https://github.com/username/project.git

And this should fix remote origin already exists error.

--

--

Ghost Together
Ghost Together

Written by Ghost Together

Ghost Together @ https://semicolon.dev is an alternative to Twitter. Sign up to meet other makers of things.

No responses yet