Code

user-manual: reset to ORIG_HEAD not HEAD to undo merge
authorJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 19 Feb 2007 23:46:09 +0000 (18:46 -0500)
committerJunio C Hamano <junkio@cox.net>
Mon, 5 Mar 2007 00:47:32 +0000 (16:47 -0800)
As Linus pointed out recently on the mailing list,

git reset --hard HEAD^

doesn't undo a merge in the case where the merge did a fast-forward.  So
the rcommendation here is a little dangerous.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/user-manual.txt

index 7b6dc22e7bad8bfc3d6f018e47e2025f2a1508ee..e37a1234fa27752b01c53536299079b6d669e941 100644 (file)
@@ -1255,7 +1255,7 @@ $ git reset --hard HEAD
 Or, if you've already commited the merge that you want to throw away,
 
 -------------------------------------------------
-$ git reset --hard HEAD^
+$ git reset --hard ORIG_HEAD
 -------------------------------------------------
 
 However, this last command can be dangerous in some cases--never