{section: I haven't pushed the merge} -If you haven't pushed the merge yet, this is easy. "git reset --hard GOOD_SHA" where GOOD_SHA is the SHA prior to the merge. *Warning:* _This completely destroys the merge and anything committed since._ It's as if it never happened. _Use with caution._ +If you haven't pushed the merge yet, this is easy. "git reset --hard PRE_MERGE_SHA" where PRE_MERGE_SHA is the SHA of the commit prior to the merge. *Warning:* _This completely destroys the merge and anything committed since._ It's as if it never happened. _Use with caution._ If you have commits after the merge that you'd like to save, you can use "git format-patch" and "git am" to store them away and re-apply them. The general technique looks something like this: + +{code} +git format-patch --stdout EARLIEST_GOOD_SHA1..CURRENT_GOOD_SHA1 > my.rescue +git reset --hard PRE_MERGE_SHA +git am my.rescue +{endcode} {section: The merge was pushed}