Autogenerated HTML docs for v1.2.4-g79f5
[git.git] / git-reset.html
index 7cacfd2..7d3cc7e 100644 (file)
@@ -3,7 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
 <head>\r
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 7.0.1" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
 <style type="text/css">\r
 /* Debug borders */\r
 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
@@ -266,7 +266,7 @@ git-reset(1) Manual Page
 <h2>NAME</h2>\r
 <div class="sectionbody">\r
 <p>git-reset -\r
-   Reset current HEAD to the specified state.\r
+   Reset current HEAD to the specified state\r
 </p>\r
 </div>\r
 </div>\r
@@ -444,6 +444,34 @@ brings your index file and the working tree back to that state,
 and resets the tip of the branch to that commit.</tt></pre>\r
 </div></div>\r
 </dd>\r
+<dt>\r
+Interrupted workflow\r
+</dt>\r
+<dd>\r
+<p>Suppose you are interrupted by an urgent fix request while you\r
+are in the middle of a large change.  The files in your\r
+working tree are not in any shape to be committed yet, but you\r
+need to get to the other branch for a quick bugfix.</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git checkout feature ;# you were working in "feature" branch and\r
+$ work work work       ;# got interrupted\r
+$ git commit -a -m 'snapshot WIP' <b>(1)</b>\r
+$ git checkout master\r
+$ fix fix fix\r
+$ git commit ;# commit with real log\r
+$ git checkout feature\r
+$ git reset --soft HEAD^ ;# go back to WIP state <b>(2)</b>\r
+$ git reset <b>(3)</b>\r
+\r
+<b>(1)</b> This commit will get blown away so a throw-away log message is OK.\r
+<b>(2)</b> This removes the 'WIP' commit from the commit history, and sets\r
+    your working tree to the state just before you made that snapshot.\r
+<b>(3)</b> After <b>(2)</b>, the index file still has all the WIP changes you\r
+    committed in <b>(1)</b>.  This sets it to the last commit you were\r
+    basing the WIP changes on.</tt></pre>\r
+</div></div>\r
+</dd>\r
 </dl>\r
 </div>\r
 <h2>Author</h2>\r
@@ -460,7 +488,7 @@ and resets the tip of the branch to that commit.</tt></pre>
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 27-Dec-2005 00:16:36 PDT\r
+Last updated 10-Mar-2006 00:31:34 UTC\r
 </div>\r
 </div>\r
 </body>\r