diff options
author | Thomas Rast <trast@student.ethz.ch> | 2009-01-17 17:09:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-17 18:37:21 -0800 |
commit | 696acf45f9638b014c7132508de26d1a571c8a33 (patch) | |
tree | ceeb225371a2f12017cdfe4dce350b626d34a6b0 /Documentation | |
parent | sha1_name: support @{-N} syntax in get_sha1() (diff) | |
download | tgif-696acf45f9638b014c7132508de26d1a571c8a33.tar.xz |
checkout: implement "-" abbreviation, add docs and tests
Have '-' mean the same as '@{-1}', i.e., the last branch we were on.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-checkout.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 9cd51514db..3bccffae62 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -133,6 +133,10 @@ the conflicted merge in the specified paths. + When this parameter names a non-branch (but still a valid commit object), your HEAD becomes 'detached'. ++ +As a special case, the "`@\{-N\}`" syntax for the N-th last branch +checks out the branch (instead of detaching). You may also specify +"`-`" which is synonymous with "`@\{-1\}`". Detached HEAD |