summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-13 13:28:57 -0800
committerJunio C Hamano <gitster@pobox.com>2017-12-13 13:28:57 -0800
commit706566524ef59a97e89ba895b800398ef823d109 (patch)
tree5d573b5192ee4eb8347826b97bcd455cfacd5705 /Documentation
parent577051bca44077b29f625cf14cac9360b2d11be9 (diff)
parent75ce14957507bc310ad118df08c4a85fd9cedc0d (diff)
downloadgit-706566524ef59a97e89ba895b800398ef823d109.tar.gz
Merge branch 'ks/doc-checkout-previous'
@{-N} in "git checkout @{-N}" may refer to a detached HEAD state, but the documentation was not clear about it, which has been fixed. * ks/doc-checkout-previous: Doc/checkout: checking out using @{-N} can lead to detached state
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-checkout.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index bfa64ca5c9..ca5fc9c798 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -274,11 +274,11 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
commit, your HEAD becomes "detached" and you are no longer on
any branch (see below for details).
+
-As a special case, the `"@{-N}"` syntax for the N-th last branch/commit
-checks out branches (instead of detaching). You may also specify
-`-` which is synonymous with `"@{-1}"`.
+You can use the `"@{-N}"` syntax to refer to the N-th last
+branch/commit checked out using "git checkout" operation. You may
+also specify `-` which is synonymous to `"@{-1}`.
+
-As a further special case, you may use `"A...B"` as a shortcut for the
+As a special case, you may use `"A...B"` as a shortcut for the
merge base of `A` and `B` if there is exactly one merge base. You can
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.