Skip to content

Commit 1c73bb0

Browse files
J. Bruce FieldsJunio C Hamano
authored andcommitted
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>
1 parent 0bc25a7 commit 1c73bb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/user-manual.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ $ git reset --hard HEAD
12551255
Or, if you've already commited the merge that you want to throw away,
12561256

12571257
-------------------------------------------------
1258-
$ git reset --hard HEAD^
1258+
$ git reset --hard ORIG_HEAD
12591259
-------------------------------------------------
12601260

12611261
However, this last command can be dangerous in some cases--never

0 commit comments

Comments
 (0)