summaryrefslogtreecommitdiffstats
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-29 00:00:27 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-29 00:00:27 +0100
commit8712b3cdb0495f5a56b91cd67e2697412447a886 (patch)
tree98dafb9b4f38617d73ef59c9085e01ee727af729 /Documentation/git-checkout.txt
parentgitweb: check if-modified-since for feeds (diff)
parentt1505: remove debugging cruft (diff)
downloadgit-8712b3cdb0495f5a56b91cd67e2697412447a886.tar.xz
git-8712b3cdb0495f5a56b91cd67e2697412447a886.zip
Merge branch 'tr/previous-branch'
* tr/previous-branch: t1505: remove debugging cruft Simplify parsing branch switching events in reflog Introduce for_each_recent_reflog_ent(). interpret_nth_last_branch(): plug small memleak Fix reflog parsing for a malformed branch switching entry Fix parsing of @{-1}@{1} interpret_nth_last_branch(): avoid traversing the reflog twice checkout: implement "-" abbreviation, add docs and tests sha1_name: support @{-N} syntax in get_sha1() sha1_name: tweak @{-N} lookup checkout: implement "@{-N}" shortcut name for N-th last branch Conflicts: sha1_name.c
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 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