summaryrefslogtreecommitdiffstats
path: root/git-checkout.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-17 15:27:31 +0900
committerJunio C Hamano <gitster@pobox.com>2017-10-17 15:27:31 +0900
commitda6200cd28cd3ffb936f0db5582b03a2d9b40e0c (patch)
treeed16c3837993721fafd8a579b7abeee238a4b49e /git-checkout.html
parent1171ab4652351c5e6fed9f3a08056ef6aabddb92 (diff)
downloadgit-htmldocs-da6200cd28cd3ffb936f0db5582b03a2d9b40e0c.tar.gz
Autogenerated HTML docs for v2.15.0-rc1-7-g2ac9c
Diffstat (limited to 'git-checkout.html')
-rw-r--r--git-checkout.html35
1 files changed, 21 insertions, 14 deletions
diff --git a/git-checkout.html b/git-checkout.html
index 00a8b0003..0b7718ed6 100644
--- a/git-checkout.html
+++ b/git-checkout.html
@@ -753,7 +753,8 @@ git-checkout(1) Manual Page
<em>git checkout</em> [-q] [-f] [-m] [--detach] &lt;commit&gt;
<em>git checkout</em> [-q] [-f] [-m] [[-b|-B|--orphan] &lt;new_branch&gt;] [&lt;start_point&gt;]
<em>git checkout</em> [-f|--ours|--theirs|-m|--conflict=&lt;style&gt;] [&lt;tree-ish&gt;] [--] &lt;paths&gt;&#8230;
-<em>git checkout</em> [-p|--patch] [&lt;tree-ish&gt;] [--] [&lt;paths&gt;&#8230;]</pre>
+<em>git checkout</em> [&lt;tree-ish&gt;] [--] &lt;pathspec&gt;&#8230;
+<em>git checkout</em> (-p|--patch) [&lt;tree-ish&gt;] [--] [&lt;paths&gt;&#8230;]</pre>
<div class="attribution">
</div></div>
</div>
@@ -832,22 +833,16 @@ be used to detach HEAD at the tip of the branch (<code>git checkout
<div class="paragraph"><p>Omitting &lt;branch&gt; detaches HEAD at the tip of the current branch.</p></div>
</dd>
<dt class="hdlist1">
-<em>git checkout</em> [-p|--patch] [&lt;tree-ish&gt;] [--] &lt;pathspec&gt;&#8230;
+<em>git checkout</em> [&lt;tree-ish&gt;] [--] &lt;pathspec&gt;&#8230;
</dt>
<dd>
<p>
- When &lt;paths&gt; or <code>--patch</code> are given, <em>git checkout</em> does <strong>not</strong>
- switch branches. It updates the named paths in the working tree
- from the index file or from a named &lt;tree-ish&gt; (most often a
- commit). In this case, the <code>-b</code> and <code>--track</code> options are
- meaningless and giving either of them results in an error. The
- &lt;tree-ish&gt; argument can be used to specify a specific tree-ish
- (i.e. commit, tag or tree) to update the index for the given
- paths before updating the working tree.
+ Overwrite paths in the working tree by replacing with the
+ contents in the index or in the &lt;tree-ish&gt; (most often a
+ commit). When a &lt;tree-ish&gt; is given, the paths that
+ match the &lt;pathspec&gt; are updated both in the index and in
+ the working tree.
</p>
-<div class="paragraph"><p><em>git checkout</em> with &lt;paths&gt; or <code>--patch</code> is used to restore modified or
-deleted paths to their original contents from the index or replace paths
-with the contents from a named &lt;tree-ish&gt; (most often a commit-ish).</p></div>
<div class="paragraph"><p>The index may contain unmerged entries because of a previous failed merge.
By default, if you try to check out such an entry from the index, the
checkout operation will fail and nothing will be checked out.
@@ -856,6 +851,18 @@ specific side of the merge can be checked out of the index by
using <code>--ours</code> or <code>--theirs</code>. With <code>-m</code>, changes made to the working tree
file can be discarded to re-create the original conflicted merge result.</p></div>
</dd>
+<dt class="hdlist1">
+<em>git checkout</em> (-p|--patch) [&lt;tree-ish&gt;] [--] [&lt;pathspec&gt;&#8230;]
+</dt>
+<dd>
+<p>
+ This is similar to the "check out paths to the working tree
+ from either the index or from a tree-ish" mode described
+ above, but lets you use the interactive interface to show
+ the "diff" output and choose which hunks to use in the
+ result. See below for the description of <code>--patch</code> option.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1426,7 +1433,7 @@ $ git add frotz</code></pre>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2017-09-25 16:24:34 JST
+Last updated 2017-10-17 15:27:19 JST
</div>
</div>
</body>