summaryrefslogtreecommitdiffstats
path: root/gitcli.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 19:54:04 -0700
committerJunio C Hamano <gitster@pobox.com>2019-07-09 19:54:04 -0700
commitc9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db (patch)
tree06ddfc72dff8e370e395a3acc692c8ab48147227 /gitcli.html
parentd0a9940c76b71c9df840a098a423d3400779d83c (diff)
downloadgit-htmldocs-c9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db.tar.gz
Autogenerated HTML docs for v2.22.0-428-g6d5b2
Diffstat (limited to 'gitcli.html')
-rw-r--r--gitcli.html28
1 files changed, 25 insertions, 3 deletions
diff --git a/gitcli.html b/gitcli.html
index b4870380a..99947e0a7 100644
--- a/gitcli.html
+++ b/gitcli.html
@@ -798,8 +798,8 @@ Many commands allow wildcards in paths, but you need to protect
</p>
<div class="listingblock">
<div class="content">
-<pre><code>$ git checkout -- *.c
-$ git checkout -- \*.c</code></pre>
+<pre><code>$ git restore *.c
+$ git restore \*.c</code></pre>
</div></div>
<div class="paragraph"><p>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
@@ -992,6 +992,28 @@ entries.</p></div>
<div class="paragraph"><p>See also <a href="http://marc.info/?l=git&amp;m=116563135620359">http://marc.info/?l=git&amp;m=116563135620359</a> and
<a href="http://marc.info/?l=git&amp;m=119150393620273">http://marc.info/?l=git&amp;m=119150393620273</a> for further
information.</p></div>
+<div class="paragraph"><p>Some other commands that also work on files in the working tree and/or
+in the index can take <code>--staged</code> and/or <code>--worktree</code>.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<code>--staged</code> is exactly like <code>--cached</code>, which is used to ask a
+ command to only work on the index, not the working tree.
+</p>
+</li>
+<li>
+<p>
+<code>--worktree</code> is the opposite, to ask a command to work on the
+ working tree only, not the index.
+</p>
+</li>
+<li>
+<p>
+The two options can be specified together to ask a command to work
+ on both the index and the working tree.
+</p>
+</li>
+</ul></div>
</div>
</div>
<div class="sect1">
@@ -1005,7 +1027,7 @@ information.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2018-06-01 00:13:01 PDT
+ 2019-07-09 19:51:04 PDT
</div>
</div>
</body>