Skip to content

How to rename an existing git remote ?

To list down your remote repository handles that is currently being used in local repository, we use git remote -v command.

> git remote -v
origin (fetch)
origin (push)

To rename a remote, you can use the following command.

git remote rename <current-remote-name> <new-name>
git remote rename origin ppbatch


> git remote -v
ppbatch (fetch)
ppbatch (push)

You can remove a git remote if you do not want it.

See also  How to install Git on Ubuntu 20.04 ?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.