Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 537 Bytes

rename-a-remote.md

File metadata and controls

22 lines (16 loc) · 537 Bytes

Rename A Remote

If you just added a remote (git remote add ...) and messed up the name or just need to rename some existing remote, you can do so with the rename command.

First, let's see the remotes we have:

$ git remote -v
origin  https://github.com/jbranchaud/til.git (fetch)
origin  https://github.com/jbranchaud/til.git (push)

To then rename origin to destination, for example, we can issue the following command:

$ git remote rename origin destination

See man git-remote for more details.