diff options
author | Matthew McCullough <matthew@github.com> | 2013-02-08 08:07:05 +0400 |
---|---|---|
committer | Matthew McCullough <matthew@github.com> | 2013-02-08 08:07:05 +0400 |
commit | e6319d0dfe4fa6880dc75615016469fa7b1bbd6e (patch) | |
tree | 2243a371e33d93639a26c2c255f7fdc06524c936 | |
parent | d1c02d60254ccf235e9591f8fe07143a8b8e6812 (diff) | |
parent | 1c92bc8b35bdb53eba4e5d6754fc3ab8741dac67 (diff) |
Merge pull request #59 from robertd/gh-pages
Add 'git branch -v' and 'git remote rename' explanations
-rw-r--r-- | branching/index.html | 15 | ||||
-rw-r--r-- | remotes/index.html | 22 |
2 files changed, 36 insertions, 1 deletions
diff --git a/branching/index.html b/branching/index.html index 9b2434d..0a75034 100644 --- a/branching/index.html +++ b/branching/index.html @@ -322,6 +322,21 @@ HelloWorld.hello switch to it so your class renaming changes are isolated. We're going to change each instance of 'HelloWorld' to 'HiWorld'.</p> + <h4> + git branch -v + <small>see the last commit on each branch</small> + </h4> + + <p>If we want to see last commits on each branch + we can run <code>git branch -v</code> to see them.</p> + +<pre> +<b>$ git branch -v</b> +* <span class="green">master</span> 54b417d fix javascript issue + development 74c111d modify component.json file + testing 62a557a update test scripts +</pre> + <pre> <b>$ git checkout -b change_class</b> Switched to a new branch 'change_class' diff --git a/remotes/index.html b/remotes/index.html index 3023bc8..7815353 100644 --- a/remotes/index.html +++ b/remotes/index.html @@ -146,11 +146,31 @@ github git@github.com:schacon/hw.git (fetch) 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 the 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> + <p class="nutshell"> <b>In a nutshell</b> with <code>git remote</code> you can list our remote repositories and whatever URL that repository is using. You can use <code>git remote add</code> to - add new remotes and <code>git remote rm</code> to delete existing ones. + add new remotes, <code>git remote rm</code> to delete existing ones or <code>git remote rename [old-alias] [new-alias]</code> to rename them. </p> <h4> |