We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 785ee49 commit caae319Copy full SHA for caae319
Documentation/git-checkout.txt
@@ -367,6 +367,18 @@ $ git checkout hello.c <3>
367
<2> take a file out of another commit
368
<3> restore hello.c from the index
369
+
370
+If you want to check out _all_ C source files out of the index,
371
+you can say
372
++
373
+------------
374
+$ git checkout -- '*.c'
375
376
377
+Note the quotes around `*.c`. The file `hello.c` will also be
378
+checked out, even though it is no longer in the working tree,
379
+because the file globbing is used to match entries in the index
380
+(not in the working tree by the shell).
381
382
If you have an unfortunate branch that is named `hello.c`, this
383
step would be confused as an instruction to switch to that branch.
384
You should instead write:
0 commit comments