On Mon, 9 Jan 2017 09:26:15 +0300
Konstantin Khomoutov <[email protected]> wrote:

> On Sun, 8 Jan 2017 09:54:30 -0800
> Michael <[email protected]> wrote:
> 
> > So, the question of "which form to use on windows" depends if you
> > are using git for windows with the normal windows shell, or if you
> > are using git for windows with cygwin and the bash shell?
> 
> Sounds about correct.  "Native" Windows shells should pass wildcards
> to Git commands unmodified, and Git will take care of their
> expansions by itself.
> 
> Git Bash and Cygwin will expand the globs themselves, unless escaped.
> And when they are escaped, some Git commands will expand these globs
> themselves.  Unfortunately, my memory fails to provide the fine
> details on when Git commands do this.

The wording of `git help cli` is vague:

|     Many commands allow wildcards in paths, but you need to
| protect them from getting globbed by the shell. These two mean
| different things:
|
|         $ git checkout -- *.c
|         $ git checkout -- \*.c
|
|     The former lets your shell expand the fileglob, and you are
| asking the dot-C files in your working tree to be overwritten with the
| version in the index. The latter passes the *.c to Git, and you are
| asking the paths in the index that match the pattern to be checked out
| to your working tree. After running git add hello.c; rm hello.c, you
| will not see hello.c in your working tree with the former, but with
| the latter you will.

So, well, "many commands" FWIW ;-)

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to