From e6ebf986696d7bfd5dc150daccf74bf7c6e5bb23 Mon Sep 17 00:00:00 2001 From: Robert Djurasaj Date: Thu, 7 Feb 2013 15:45:56 -0700 Subject: [PATCH] Add git remote rename --- remotes/index.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/remotes/index.html b/remotes/index.html index 3023bc8..8e24cbc 100644 --- a/remotes/index.html +++ b/remotes/index.html @@ -111,6 +111,26 @@ origin git@github.com:github/git-reference.git (push) $ git remote -v github git@github.com:schacon/hw.git (fetch) github git@github.com:schacon/hw.git (push) + + +

+ git remote rename [old-alias] [new-alias] + rename remote aliases +

+ +

If you want to rename remote aliases without having to delete them and add them again + you can do that by running git remote rename [old-alias] [new-alias]. This will + allow you to modify current name of the remote.

+ +
+$ git remote add github git@github.com:schacon/hw.git
+$ git remote -v
+github	git@github.com:schacon/hw.git (fetch)
+github	git@github.com:schacon/hw.git (push)
+$ git remote rename github origin
+$ git remote -v
+origin	git@github.com:schacon/hw.git (fetch)
+origin	git@github.com:schacon/hw.git (push)
 

Like the branch naming, remote alias names are arbitrary - just as 'master'