1
0

Add git remote rename

This commit is contained in:
Robert Djurasaj 2013-02-07 15:45:56 -07:00
parent 5b2906c6d7
commit e6ebf98669

View File

@ -111,6 +111,26 @@ origin git@github.com:github/git-reference.git (push)
<b>$ git remote -v</b> <b>$ git remote -v</b>
github git@github.com:schacon/hw.git (fetch) github git@github.com:schacon/hw.git (fetch)
github git@github.com:schacon/hw.git (push) github git@github.com:schacon/hw.git (push)
</pre>
<h4>
git remote rename [old-alias] [new-alias]
<small>rename remote aliases</small>
</h4>
<p>If you want to rename remote aliases without having to delete them and add them again
you can do that by running <code>git remote rename [old-alias] [new-alias]</code>. This will
allow you to modify current name of the remote.</p>
<pre>
<b>$ git remote add github git@github.com:schacon/hw.git</b>
<b>$ git remote -v</b>
github git@github.com:schacon/hw.git (fetch)
github git@github.com:schacon/hw.git (push)
<b>$ git remote rename github origin</b>
<b>$ git remote -v</b>
origin git@github.com:schacon/hw.git (fetch)
origin git@github.com:schacon/hw.git (push)
</pre> </pre>
<p>Like the branch naming, remote alias names are arbitrary - just as 'master' <p>Like the branch naming, remote alias names are arbitrary - just as 'master'