Say there are two branches master and branchA.
I work on master, a friend on branchA.
Once things are finalized, we merge branchA with master.
After several commits on the merged master, the client wants the
work done on branchA removed, but NOT the commits done after the merge.
How can we do it?
Read through Pro Git – Undoing Merges.
Basically, you
git revertthe 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