summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8bb95bb)
raw | patch | inline | side by side (parent: 8bb95bb)
author | Thomas Rast <trast@student.ethz.ch> | |
Sun, 18 Jul 2010 18:23:26 +0000 (20:23 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 19 Jul 2010 16:12:42 +0000 (09:12 -0700) |
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>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-reset.txt | patch | blob | history |
index 1550ba25566b99429f69ff47a4a95967a94a6b17..b04d129b3f0b220bd1358a0d692ff25d1e2985bb 100644 (file)
+
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::
+
------------
<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::
+
------------