Thread (1 message) 1 message, 1 author, 2016-06-15

Re: checkout extra files

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:42

Angelo Borsotti [off-list ref] writes:
It makes quite clear that the command accepts wildcards
(not expanded by the shell), which was is not clear in the current
man page (although one could imagine that <path> could also be a
wildcard).

P.S. In the man page there is also a <pathspec>

    "*git checkout* [-p|--patch] [<tree-ish>] [--] <pathspec>...

that should perhaps be a <path>
That's backwards.  Saying <path> as if it means a plain vanilla
pathname is a cause of confusion.  The command takes pathspec, which
is a pattern (see "git help glossary"). The places in the text that
say <path> may need to be fixed.

It just happens that you do not realize that you are using pathspec
when you say "git checkout hello.c", as the pattern "hello.c" only
matches the one pathname "hello.c".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help