Skip to content

Commit

Permalink
user-manual: reset to ORIG_HEAD not HEAD to undo merge
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J. Bruce Fields authored and Junio C Hamano committed Mar 5, 2007
1 parent 0bc25a7 commit 1c73bb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c73bb0

Please sign in to comment.