Add git remote rename
Robert Djurasaj committed
Feb 7, 2013 at 15:45 UTC
e6ebf986696d7bfd5dc150daccf74bf7c6e5bb23
1 file changed
+20
remotes/index.html
+20
@@ -111,6 +111,26 @@ origin git@github.com:github/git-reference.git (push)
111
<b>$ git remote -v</b>
112
github git@github.com:schacon/hw.git (fetch)
113
github git@github.com:schacon/hw.git (push)
114
+</pre>
115
+
116
+ <h4>
117
+ git remote rename [old-alias] [new-alias]
118
+ <small>rename remote aliases</small>
119
+ </h4>
120
+
121
+ <p>If you want to rename remote aliases without having to delete them and add them again
122
+ you can do that by running <code>git remote rename [old-alias] [new-alias]</code>. This will
123
+ allow you to modify current name of the remote.</p>
124
+
125
+<pre>
126
+<b>$ git remote add github git@github.com:schacon/hw.git</b>
127
+<b>$ git remote -v</b>
128
+github git@github.com:schacon/hw.git (fetch)
129
+github git@github.com:schacon/hw.git (push)
130
+<b>$ git remote rename github origin</b>
131
+<b>$ git remote -v</b>
132
+origin git@github.com:schacon/hw.git (fetch)
133
+origin git@github.com:schacon/hw.git (push)
134
</pre>
135
136
<p>Like the branch naming, remote alias names are arbitrary - just as 'master'