1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Rename A Remote as a git til

This commit is contained in:
jbranchaud
2017-06-07 22:12:16 -05:00
parent 7ddf06f356
commit 3d6cfe3e89
2 changed files with 24 additions and 1 deletions

22
git/rename-a-remote.md Normal file
View File

@@ -0,0 +1,22 @@
# 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:
```bash
$ 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:
```bash
$ git remote rename origin destination
```
See `man git-remote` for more details.