user-manual: reset to ORIG_HEAD not HEAD to undo merge
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>
J. Bruce Fields committed
Feb 19, 2007 at 18:46 UTC
1c73bb0ef7bf6632d1aa5d6760bba7ea4e336fe9
1 file changed
+1
-1
Documentation/user-manual.txt
+1
-1
@@ -1255,7 +1255,7 @@ $ git reset --hard HEAD
1255
Or, if you've already commited the merge that you want to throw away,
1256
1257
-------------------------------------------------
1258
-$ git reset --hard HEAD^
1258
+$ git reset --hard ORIG_HEAD
1259
-------------------------------------------------
1260
1261
However, this last command can be dangerous in some cases--never