Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 75d6e55

Browse files
trastgitster
authored andcommitted
Documentation: @{-N} can refer to a commit
The @{-N} syntax always referred to the N-th last thing checked out, which can be either a branch or a commit (for detached HEAD cases). However, the documentation only mentioned branches. Edit in a "/commit" in the appropriate places. Reported-by: Kevin <[email protected]> Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ac93028 commit 75d6e55

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Documentation/git-checkout.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
232232
commit, your HEAD becomes "detached" and you are no longer on
233233
any branch (see below for details).
234234
+
235-
As a special case, the `"@{-N}"` syntax for the N-th last branch
236-
checks out the branch (instead of detaching). You may also specify
235+
As a special case, the `"@{-N}"` syntax for the N-th last branch/commit
236+
checks out branches (instead of detaching). You may also specify
237237
`-` which is synonymous with `"@{-1}"`.
238238
+
239239
As a further special case, you may use `"A...B"` as a shortcut for the

Documentation/revisions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ some output processing may assume ref names in UTF-8.
8888
branch 'blabla' then '@\{1\}' means the same as 'blabla@\{1\}'.
8989

9090
'@\{-<n>\}', e.g. '@\{-1\}'::
91-
The construct '@\{-<n>\}' means the <n>th branch checked out
91+
The construct '@\{-<n>\}' means the <n>th branch/commit checked out
9292
before the current one.
9393

9494
'<branchname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::

0 commit comments

Comments
 (0)