HomeContact
Git
How to remove or change remote origin from a Git repository
September 19, 2023
1 min

Table Of Contents

01
Removing and adding
02
Updating

Have you ever encountered this error: remote origin already exists when wanting to add one? Let’s see how to solve that.

There is two way to do that.

Removing and adding

First, remove the origin from your repo:

git remote remove origin

Then try again the command that was throwing you an error before:

git remote add origin git://yourlink.com/

Updating

There is a way to directly update the remote origin by using this command:

git remote set-url origin git://yourlink.com/

Related Posts

Delete all local git branches in one command line
August 07, 2020
1 min
© 2023, All Rights Reserved.

Quick Links

Contact Us

Social Media