gomisha
gomisha

Reputation: 2922

Deleting duplicate reference to remote Git repo (without deleting the repo)

I currently have 2 references to the same remote Github repo. Both references have the same remote URL, so when I do git remote -v I get:

myrepo  https://github.com/<user ID>/myrepo (fetch)
myrepo  https://github.com/<user ID>/myrepo (push)
origin  https://github.com/<user ID>/myrepo (fetch)
origin  https://github.com/<user ID>/myrepo (push)

I want to delete the myrepo remote reference without deleting the remote repo. So I want to end up with the following when I do git remote -v:

origin  https://github.com/<user ID>/myrepo (fetch)
origin  https://github.com/<user ID>/myrepo (push)

I wasn't sure if git remote remove myrepo will delete the remote repo or just the reference to it.

Upvotes: 1

Views: 653

Answers (1)

sachav
sachav

Reputation: 1316

git remote rm myrepo is what you're looking for. It will not delete the remote repository but just your local reference to it.

Upvotes: 1

Related Questions