Skip to content

Commit

Permalink
Documentation/reset: move "undo permanently" example behind "make topic"
Browse files Browse the repository at this point in the history
I consider the latter usage more important.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Jul 19, 2010
1 parent 8bb95bb commit 6e90f7b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Documentation/git-reset.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,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::
+
------------
Expand All @@ -156,6 +143,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::
+
------------
Expand Down

0 comments on commit 6e90f7b

Please sign in to comment.