summaryrefslogtreecommitdiffstats
path: root/git-checkout.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2006-04-29 07:02:01 +0000
committerJunio C Hamano <junio@hera.kernel.org>2006-04-29 07:02:01 +0000
commitc8d88c2181b2e1675c5057ec9446be2f6f7529b3 (patch)
treeff8704aff72f29d72cb8f8ddcf9b9066cbb54478 /git-checkout.html
parent6de0ecdcce3d89e64a763ff208d44a8e65e5b332 (diff)
downloadgit-htmldocs-c8d88c2181b2e1675c5057ec9446be2f6f7529b3.tar.gz
Autogenerated HTML docs for v1.3.1-g8971
Diffstat (limited to 'git-checkout.html')
-rw-r--r--git-checkout.html35
1 files changed, 24 insertions, 11 deletions
diff --git a/git-checkout.html b/git-checkout.html
index d8ec4847d..c57978d44 100644
--- a/git-checkout.html
+++ b/git-checkout.html
@@ -357,23 +357,36 @@ mistake, and gets it back from the index.
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git checkout master <b>(1)</b>
-$ git checkout master~2 Makefile <b>(2)</b>
+<pre><tt>$ git checkout master <b>(1)</b>
+$ git checkout master~2 Makefile <b>(2)</b>
$ rm -f hello.c
-$ git checkout hello.c <b>(3)</b>
-
-<b>(1)</b> switch branch
-<b>(2)</b> take out a file out of other commit
-<b>(3)</b> or "git checkout -- hello.c", as in the next example.</tt></pre>
+$ git checkout hello.c <b>(3)</b></tt></pre>
</div></div>
-<p>If you have an unfortunate branch that is named <tt>hello.c</tt>, the
-last step above would be confused as an instruction to switch to
-that branch. You should instead write:</p>
+<ol>
+<li>
+<p>
+switch branch
+</p>
+</li>
+<li>
+<p>
+take out a file out of other commit
+</p>
+</li>
+<li>
+<p>
+restore hello.c from HEAD of current branch
+</p>
+<p>If you have an unfortunate branch that is named <tt>hello.c</tt>, this
+step would be confused as an instruction to switch to that branch.
+You should instead write:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git checkout -- hello.c</tt></pre>
</div></div>
</li>
+</ol>
+</li>
<li>
<p>
After working in a wrong branch, switching to the correct
@@ -441,7 +454,7 @@ $ git update-index frotz</tt></pre>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 18-Mar-2006 07:45:34 UTC
+Last updated 29-Apr-2006 07:01:33 UTC
</div>
</div>
</body>