Ad space (banner)
🌿Git Lessons
Lesson 49 / 59

Removing a Remote with git remote remove

This lesson covers removing a registered remote repository with git remote remove. It's for anyone searching "git remote remove usage."

git remote remove deletes the information for a registered remote repository. Use it when a remote's URL changes, or you want to clean up a connection you no longer need.

In Try It, run git remote remove origin. The remote repository info registered under the name origin is deleted.

A common early mistake is thinking this deletes the remote itself (like the repository on GitHub) — it doesn't; it only removes the "connection info" registered on your own computer, and has no effect on the remote side's data. In real teams, this command is used when migrating a repository or changing its URL, to remove the old connection and register the new one in its place.

Git
Try it (type this into the pseudo terminal)
git remote remove origin

🧑‍💻 You can type this command into the Git pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)