Jump to content

How do I undo an accidental merge?


Recommended Posts

I'm just trying a subtractive merge, and to me... it doesn't appear to be operating like I would expect (or at least like previous post have indicated) at all. It did indeed remove the change back to the previous version of the file... but the previous version from the OTHER BRANCH, not the one that I accidently merge INTO. So this is no the behaviour I'm after at all. I need to revert a branch I accidentally merged from a test branch into the main dev branch (instead of that projects sub branch of the same test). 

So I have "DevProject1" that is branched from our core framework "main" and "DevToolProject" also branched from "main" but I have merged from DevToolProject. DevProject1 has a branch DevProject1/BigChangeTest. I wanted to merge from DevToolProject to DevProject1/BigChangeTest to update to the changes made from the framework in DevToolProject.

DevProject1:1586(was current head) -> 1602 (accidental merge). That merge came from DevToolProject:1601. It was supposed to go to  DevProject1/BigChangeTest (head is 1600). Now doing a subtractive merge land those files in the state that they were in from 1601's ancestor (DevToolProject:1594) and not what they were in DevProject1:1586, which is a huge issue. How do I simply reveres the change back to where they were in DevProject1:1586?

The subtractive merge I tried was from the accidental merge's source DevToolProject:1601

Link to comment
Share on other sites

Edit. I think I misunderstood the action needed. It was to do the subtractive merge on the new head itself (subtractive merge from 1602, which modifies itself to revert). That did nothing before, leading me to assume it was the source of the merge you needed to to the subtraction from, but it seems after a refresh of the branch explorer it did indeed have file modifications after invoking a subtractive merge on itself  

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...