summaryrefslogtreecommitdiffstats
path: root/git-checkout.html
diff options
context:
space:
mode:
Diffstat (limited to 'git-checkout.html')
-rw-r--r--git-checkout.html43
1 files changed, 19 insertions, 24 deletions
diff --git a/git-checkout.html b/git-checkout.html
index b44448f10..add5ff025 100644
--- a/git-checkout.html
+++ b/git-checkout.html
@@ -1442,13 +1442,11 @@ to checkout these paths out of the index.</p></div>
<div class="sect1">
<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-The following sequence checks out the <code>master</code> branch, reverts
- the <code>Makefile</code> to two revisions back, deletes <code>hello.c</code> by
- mistake, and gets it back from the index.
-</p>
+<div class="sect2">
+<h3 id="_1_paths">1. Paths</h3>
+<div class="paragraph"><p>The following sequence checks out the <code>master</code> branch, reverts
+the <code>Makefile</code> to two revisions back, deletes <code>hello.c</code> by
+mistake, and gets it back from the index.</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ git checkout master <b>&lt;1&gt;</b>
@@ -1471,6 +1469,8 @@ take a file out of another commit
<p>
restore <code>hello.c</code> from the index
</p>
+</li>
+</ol></div>
<div class="paragraph"><p>If you want to check out <em>all</em> C source files out of the index,
you can say</p></div>
<div class="listingblock">
@@ -1488,14 +1488,11 @@ You should instead write:</p></div>
<div class="content">
<pre><code>$ git checkout -- hello.c</code></pre>
</div></div>
-</li>
-</ol></div>
-</li>
-<li>
-<p>
-After working in the wrong branch, switching to the correct
- branch would be done using:
-</p>
+</div>
+<div class="sect2">
+<h3 id="_2_merge">2. Merge</h3>
+<div class="paragraph"><p>After working in the wrong branch, switching to the correct
+branch would be done using:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ git checkout mytopic</code></pre>
@@ -1518,12 +1515,11 @@ Auto-merging frotz</code></pre>
<div class="paragraph"><p>After this three-way merge, the local modifications are <em>not</em>
registered in your index file, so <code>git diff</code> would show you what
changes you made since the tip of the new branch.</p></div>
-</li>
-<li>
-<p>
-When a merge conflict happens during switching branches with
- the <code>-m</code> option, you would see something like this:
-</p>
+</div>
+<div class="sect2">
+<h3 id="_3_merge_conflict">3. Merge conflict</h3>
+<div class="paragraph"><p>When a merge conflict happens during switching branches with
+the <code>-m</code> option, you would see something like this:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ git checkout -m mytopic
@@ -1540,8 +1536,7 @@ files. Edit and resolve the conflict and mark it resolved with
<pre><code>$ edit frotz
$ git add frotz</code></pre>
</div></div>
-</li>
-</ol></div>
+</div>
</div>
</div>
<div class="sect1">
@@ -1635,7 +1630,7 @@ checkout.thresholdForParallelism
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:44:53 PST
+ 2023-04-27 16:21:11 PDT
</div>
</div>
</body>