Unmerge a git branch, keeping post-merge commits

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:

  1. Git SCM – Undoing Merges

  2. Git Ready – Rolling back changes with revert

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)