Skip to content

Commit

Permalink
Clarify documentation of "git checkout <tree-ish> paths" syntax
Browse files Browse the repository at this point in the history
The SYNOPSIS section of the manual writes:

    git checkout [options] [<tree-ish>] [--] <paths>...

but the DESCRIPTION says that this form checks the paths out "from the
index, or from a named commit."  A later sentence refers to the same
argument as "<tree-ish> argument", but it is not clear that these two
sentences are talking about the same command line argument for first-time
readers.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nanako Shiraishi authored and Junio C Hamano committed Dec 18, 2008
1 parent b4955fb commit ecc03c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/git-checkout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ the first namespace level.

When <paths> are given, this command does *not* switch
branches. It updates the named paths in the working tree from
the index file, or from a named commit. In
the index file, or from a named <tree-ish> (most often a commit). In
this case, the `-b` options is meaningless and giving
either of them results in an error. <tree-ish> argument can be
used to specify a specific tree-ish (i.e. commit, tag or tree)
Expand Down

0 comments on commit ecc03c1

Please sign in to comment.