diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-10 15:15:09 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-10 15:15:09 -0800 |
commit | b48968522932c1f3142591d9f2a3421833de78af (patch) | |
tree | 648febe954b673570a636b2b19ac76b570cb67c2 /git-reset.html | |
parent | 59e8824741436987ea088ff1f3c7c82d6fe48fc9 (diff) | |
download | git-htmldocs-b48968522932c1f3142591d9f2a3421833de78af.tar.gz |
Autogenerated HTML docs for v2.24.1-485-gad05a
Diffstat (limited to 'git-reset.html')
-rw-r--r-- | git-reset.html | 72 |
1 files changed, 58 insertions, 14 deletions
diff --git a/git-reset.html b/git-reset.html index 5cfd2f685..9dc767633 100644 --- a/git-reset.html +++ b/git-reset.html @@ -749,8 +749,9 @@ git-reset(1) Manual Page <h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
-<pre class="content"><em>git reset</em> [-q] [<tree-ish>] [--] <paths>…
-<em>git reset</em> (--patch | -p) [<tree-ish>] [--] [<paths>…]
+<pre class="content"><em>git reset</em> [-q] [<tree-ish>] [--] <pathspec>…
+<em>git reset</em> [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>]
+<em>git reset</em> (--patch | -p) [<tree-ish>] [--] [<pathspec>…]
<em>git reset</em> [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]</pre>
<div class="attribution">
</div></div>
@@ -759,24 +760,27 @@ git-reset(1) Manual Page <div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
-<div class="paragraph"><p>In the first and second form, copy entries from <code><tree-ish></code> to the index.
-In the third form, set the current branch head (<code>HEAD</code>) to <code><commit></code>,
+<div class="paragraph"><p>In the first three forms, copy entries from <code><tree-ish></code> to the index.
+In the last form, set the current branch head (<code>HEAD</code>) to <code><commit></code>,
optionally modifying index and working tree to match.
The <code><tree-ish></code>/<code><commit></code> defaults to <code>HEAD</code> in all forms.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
-<em>git reset</em> [-q] [<tree-ish>] [--] <paths>…
+<em>git reset</em> [-q] [<tree-ish>] [--] <pathspec>…
+</dt>
+<dt class="hdlist1">
+<em>git reset</em> [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>]
</dt>
<dd>
<p>
- This form resets the index entries for all <code><paths></code> to their
- state at <code><tree-ish></code>. (It does not affect the working tree or
- the current branch.)
+ These forms reset the index entries for all paths that match the
+ <code><pathspec></code> to their state at <code><tree-ish></code>. (It does not affect
+ the working tree or the current branch.)
</p>
-<div class="paragraph"><p>This means that <code>git reset <paths></code> is the opposite of <code>git add
-<paths></code>. This command is equivalent to
-<code>git restore [--source=<tree-ish>] --staged <paths>...</code>.</p></div>
-<div class="paragraph"><p>After running <code>git reset <paths></code> to update the index entry, you can
+<div class="paragraph"><p>This means that <code>git reset <pathspec></code> is the opposite of <code>git add
+<pathspec></code>. This command is equivalent to
+<code>git restore [--source=<tree-ish>] --staged <pathspec>...</code>.</p></div>
+<div class="paragraph"><p>After running <code>git reset <pathspec></code> to update the index entry, you can
use <a href="git-restore.html">git-restore(1)</a> to check the contents out of the index to
the working tree. Alternatively, using <a href="git-restore.html">git-restore(1)</a>
and specifying a commit with <code>--source</code>, you
@@ -784,7 +788,7 @@ can copy the contents of a path out of a commit to the index and to the working tree in one go.</p></div>
</dd>
<dt class="hdlist1">
-<em>git reset</em> (--patch | -p) [<tree-ish>] [--] [<paths>…]
+<em>git reset</em> (--patch | -p) [<tree-ish>] [--] [<pathspec>…]
</dt>
<dd>
<p>
@@ -895,6 +899,46 @@ between the three commands.</p></div> override the default behavior.
</p>
</dd>
+<dt class="hdlist1">
+--pathspec-from-file=<file>
+</dt>
+<dd>
+<p>
+ Pathspec is passed in <code><file></code> instead of commandline args. If
+ <code><file></code> is exactly <code>-</code> then standard input is used. Pathspec
+ elements are separated by LF or CR/LF. Pathspec elements can be
+ quoted as explained for the configuration variable <code>core.quotePath</code>
+ (see <a href="git-config.html">git-config(1)</a>). See also <code>--pathspec-file-nul</code> and
+ global <code>--literal-pathspecs</code>.
+</p>
+</dd>
+<dt class="hdlist1">
+--pathspec-file-nul
+</dt>
+<dd>
+<p>
+ Only meaningful with <code>--pathspec-from-file</code>. Pathspec elements are
+ separated with NUL character and all other characters are taken
+ literally (including newlines and quotes).
+</p>
+</dd>
+<dt class="hdlist1">
+--
+</dt>
+<dd>
+<p>
+ Do not interpret any more arguments as options.
+</p>
+</dd>
+<dt class="hdlist1">
+<pathspec>…
+</dt>
+<dd>
+<p>
+ Limits the paths affected by the operation.
+</p>
+<div class="paragraph"><p>For more details, see the <em>pathspec</em> entry in <a href="gitglossary.html">gitglossary(7)</a>.</p></div>
+</dd>
</dl></div>
</div>
</div>
@@ -1444,7 +1488,7 @@ entries:</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2019-07-09 19:51:04 PDT
+ 2019-12-10 15:12:20 PST
</div>
</div>
</body>
|