Read through Pro Git – Undoing Merges.
Basically, you git revert
the merge commit:
git revert -m 1 hash_of_merge_commit
You may end up with some conflicts that you’ll have to manually unmerge, just like when merging normally.
Additional links:
-
Git SCM – Undoing Merges
-
Git Ready – Rolling back changes with revert