summaryrefslogtreecommitdiff
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-01-17 16:09:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-18 02:37:21 (GMT)
commit696acf45f9638b014c7132508de26d1a571c8a33 (patch)
treeceeb225371a2f12017cdfe4dce350b626d34a6b0 /Documentation/git-checkout.txt
parentd18ba22154574390dbff2c060f44b9715477e95a (diff)
downloadgit-696acf45f9638b014c7132508de26d1a571c8a33.zip
git-696acf45f9638b014c7132508de26d1a571c8a33.tar.gz
git-696acf45f9638b014c7132508de26d1a571c8a33.tar.bz2
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/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 9cd5151..3bccffa 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