Minor typos in the documentation for git checkout <branch>
- From
- Rory O’Kane <rory@roryokane.com>
- Date
- Jan 17, 2019, 00:17 UTC
- Message-ID
- <CAD_ag1MODHkfkMyaovg2JgcsX-=Tk6+BHFSYxwE8g5HGhvZ-1g@mail.gmail.com>
I noticed some errors in one paragraph of the documentation for the <branch> argument of git-checkout. A convenient link to that documentation: https://git-scm.com/docs/git-checkout#git-checkout-ltbranchgt
This is the current AsciiDoc source for that paragraph:
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}`.That source comes from Documentation/git-checkout.txt: https://github.com/git/git/blob/77556354bb7ac50450e3b28999e3576969869068/Documentation/git-checkout.txt#L290-L292
I suggest changing that source to this:
You can use the `"@{-<n>}"` syntax to refer to the <n>th last
branch/commit checked out using the "git checkout" operation. You
may also specify `"-"`, which is synonymous to `"@{-1}"`.These are the changes:
- Added the missing closing double quote to `"@{-1}` at the end.
- Added the word “the” before ‘"git checkout” operation’.
- Added quotes around “-”, to make it more visible and consistent with the
other syntax in the paragraph.
- Added comma before “which”.
- For consistency, used the angle bracket style of placeholder also used by
the explanation of the “@{-<n>}, e.g. @{-1}” syntax (see link) within the
documentation for gitrevisions (see link).
[gitrevisions source]:
https://github.com/git/git/blob/77556354bb7ac50450e3b28999e3576969869068/Documentation/revisions.txt#L94-L96
[gitrevisions rendered]:
https://git-scm.com/docs/gitrevisions#gitrevisions-em-ltngtemegem-1em(This is my first email to the Git mailing list; I hope I did it right.)