0

How do I unmerge/remove a previously added branch from a base branch without deleting the merged branch?

Here is the scenario:

Long back I have merged a branch (x) to a base branch (b), since then I have many branches (y, z, ...) to b and have several commits and pushes. Now I need to remove the changes of x from b without deleting b. So that later if required I can merge that branch again and the changes of x are there in b after merge.

Is it possible or do I need to remove my changes in some other branch (o), which will override the changes of x in b.

Abhishek Dhanraj Shahdeo
  • 1,356
  • 2
  • 14
  • 35
  • 1
    `hg backout` is probably what you're looking for. I'm going to mark this question as a duplicate, because there's another very similar question that should give you the information you need to do what you need without deleting the branch. – Nanhydrin Sep 24 '18 at 08:10
  • 1
    Possible duplicate of [What's the best way to back out multiple changesets in mercurial?](https://stackoverflow.com/questions/10691993/whats-the-best-way-to-back-out-multiple-changesets-in-mercurial) – Nanhydrin Sep 24 '18 at 08:10

0 Answers0