1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 17:16:18 +02:00

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>
This commit is contained in:
J. Bruce Fields 2007-02-19 18:46:09 -05:00 committed by Junio C Hamano
parent 0bc25a7842
commit 1c73bb0ef7

View 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