git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC PATCH 5/5] Documentation/reset: move "undo permanently" example behind "make topic"

From
Thomas Rast <trast@student.ethz.ch>
Date
Jul 16, 2010, 09:44 UTC
Message-ID
<acd131cb3c2f6f7d4aca2c53738fb458380bb8c9.1279273256.git.trast@student.ethz.ch>
In-Reply-To
<cover.1279273256.git.trast@student.ethz.ch>
I consider the latter usage more important.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
 Documentation/git-reset.txt |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index ce08581..34da771 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -127,19 +127,6 @@ edit the message further, you can give -C option instead.
 +
 See also the --amend option to linkgit:git-commit[1].
 
-Undo commits permanently::
-+
-------------
-$ git commit ...
-$ git reset --hard HEAD~3   <1>
-------------
-+
-<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
-and you do not want to ever see them again.  Do *not* do this if
-you have already given these commits to somebody else.  (See the
-"RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for
-the implications of doing so.)
-
 Undo a commit, making it a topic branch::
 +
 ------------
@@ -155,6 +142,19 @@ current HEAD.
 <2> Rewind the master branch to get rid of those three commits.
 <3> Switch to "topic/wip" branch and keep working.
 
+Undo commits permanently::
++
+------------
+$ git commit ...
+$ git reset --hard HEAD~3   <1>
+------------
++
+<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
+and you do not want to ever see them again.  Do *not* do this if
+you have already given these commits to somebody else.  (See the
+"RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for
+the implications of doing so.)
+
 Undo a merge or pull::
 +
 ------------
-- 
1.7.2.rc3.259.g43154
Previous: Thomas RastNext: Junio C Hamano
Message 13 of 14 in “git-reset documentation changes”
  1. 0/5 git-reset documentation changesThomas Rast, Jul 16, 2010
  2. 1/5 Documentation/git-reset: reorder modes for soft-mixed-hard progressionThomas Rast, Jul 16, 2010
  3. 2/5 Documentation/reset: separate options by modeThomas Rast, Jul 16, 2010
  4. Junio C HamanoJul 16, 2010
  5. 0/5 git-reset documentation changesThomas Rast, Jul 18, 2010
  6. 1/5 Documentation/git-reset: reorder modes for soft-mixed-hard progressionThomas Rast, Jul 18, 2010
  7. 2/5 Documentation/reset: separate options by modeThomas Rast, Jul 18, 2010
  8. 3/5 Documentation/reset: promote 'examples' one section upThomas Rast, Jul 18, 2010
  9. 4/5 Documentation/reset: reorder examples to match descriptionThomas Rast, Jul 18, 2010
  10. 5/5 Documentation/reset: move "undo permanently" example behind "make topic"Thomas Rast, Jul 18, 2010
  11. 3/5 Documentation/reset: promote 'examples' one section upThomas Rast, Jul 16, 2010
  12. 4/5 Documentation/reset: reorder examples to match descriptionThomas Rast, Jul 16, 2010
  13. 5/5 Documentation/reset: move "undo permanently" example behind "make topic"Thomas Rast, Jul 16, 2010
  14. Junio C HamanoJul 16, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.