diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-17 15:27:31 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-17 15:27:31 +0900 |
commit | da6200cd28cd3ffb936f0db5582b03a2d9b40e0c (patch) | |
tree | ed16c3837993721fafd8a579b7abeee238a4b49e /git-checkout.html | |
parent | 1171ab4652351c5e6fed9f3a08056ef6aabddb92 (diff) | |
download | git-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.html | 35 |
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] <commit>
<em>git checkout</em> [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
<em>git checkout</em> [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>…
-<em>git checkout</em> [-p|--patch] [<tree-ish>] [--] [<paths>…]</pre>
+<em>git checkout</em> [<tree-ish>] [--] <pathspec>…
+<em>git checkout</em> (-p|--patch) [<tree-ish>] [--] [<paths>…]</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 <branch> detaches HEAD at the tip of the current branch.</p></div>
</dd>
<dt class="hdlist1">
-<em>git checkout</em> [-p|--patch] [<tree-ish>] [--] <pathspec>…
+<em>git checkout</em> [<tree-ish>] [--] <pathspec>…
</dt>
<dd>
<p>
- When <paths> 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 <tree-ish> (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
- <tree-ish> 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 <tree-ish> (most often a
+ commit). When a <tree-ish> is given, the paths that
+ match the <pathspec> are updated both in the index and in
+ the working tree.
</p>
-<div class="paragraph"><p><em>git checkout</em> with <paths> 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 <tree-ish> (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) [<tree-ish>] [--] [<pathspec>…]
+</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>
|