Skip to content

Commit 7065665

Browse files
committed
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
2 parents 577051b + 75ce149 commit 7065665

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Documentation/git-checkout.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,11 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
274274
commit, your HEAD becomes "detached" and you are no longer on
275275
any branch (see below for details).
276276
+
277-
As a special case, the `"@{-N}"` syntax for the N-th last branch/commit
278-
checks out branches (instead of detaching). You may also specify
279-
`-` which is synonymous with `"@{-1}"`.
277+
You can use the `"@{-N}"` syntax to refer to the N-th last
278+
branch/commit checked out using "git checkout" operation. You may
279+
also specify `-` which is synonymous to `"@{-1}`.
280280
+
281-
As a further special case, you may use `"A...B"` as a shortcut for the
281+
As a special case, you may use `"A...B"` as a shortcut for the
282282
merge base of `A` and `B` if there is exactly one merge base. You can
283283
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
284284

0 commit comments

Comments
 (0)