mirror of
https://github.com/git/git.git
synced 2024-09-22 14:51:10 +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:
parent
0bc25a7842
commit
1c73bb0ef7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user