From: Junio C Hamano Date: Mon, 27 Jan 2014 18:45:30 +0000 (-0800) Subject: Merge branch 'tr/nth-previous-is-a-commit' X-Git-Tag: v1.9-rc1~11 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c380cf85a79c78d9dceb9290c9d4017d30804521?hp=bf3939901bd18f9d22f1b54323d2dd8032ec8051 Merge branch 'tr/nth-previous-is-a-commit' * tr/nth-previous-is-a-commit: Documentation: @{-N} can refer to a commit --- diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 91294f89c8..33ad2adf5c 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -232,8 +232,8 @@ 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 -checks out the branch (instead of detaching). You may also specify +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}"`. + As a further special case, you may use `"A...B"` as a shortcut for the diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index 2c06ed34ad..5a286d0d61 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -88,7 +88,7 @@ some output processing may assume ref names in UTF-8. branch 'blabla' then '@\{1\}' means the same as 'blabla@\{1\}'. '@\{-\}', e.g. '@\{-1\}':: - The construct '@\{-\}' means the th branch checked out + The construct '@\{-\}' means the th branch/commit checked out before the current one. '@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::