Sublime Forum

Quick way to abort a merge with conflicts?

#1

I’m able to abort a conflicted merge in multiple steps, but would be happy to learn of an easier way. (SmartGit has a one-step “abort merge” feature – that’s what I’m used to.)

Thanks!

TRL

0 Likes

#2

Hi @trlorenz,

Thank you for using Sublime Merge!

If you are in a conflicting state due to a merge, the easiest way to abort this process would be through the commit changes dialog.

In the top-right corner of the dialog there is an abort merge button that can be pressed to abort the merge process.

Is this what you’re looking for? If not, I can help investigate some alternatives to speed up the process for you.

Kind regards,
- Dylan Johnston
Software Engineer, Sublime HQ

1 Like

#3

No, that’s awesome. So, uh… not sure how I missed that big red button. Maybe I didn’t hover the right element or something. Anyway, thanks, and sorry for not digging deeper first!

0 Likes

#4

Always happy to help!

0 Likes

#5

Back in 2021 with version 2056

How is aborting the merge achieved now? I’ve tried the command palette, and every drop down and hamburger menu in sight, no luck.

0 Likes

#6

I believe the button is in the same place now as it always was:

0 Likes

#7

Thanks, but I’m certain there was no sign of that button (or indeed the text summary at the top IIRC) in 2056 on Linux - I failed to mention it was the Linux version, my bad.

I bailed out by essentially accepting the base version and then zapping the branch altogether as I was just kicking off on the feature.

I’ll have another look in the morning - see if I can replicate and report back either way.

0 Likes

#8

@mrsean2k, if you used --autostash, you may have ended up in this state:

0 Likes

#9

Aha, that looks promising. Handily I’ve deleted both the errant stash and the branch I was applying it to - it was ~5 lines so easy to cut and paste and I wanted to get out of my predicament ASAP.

I think that I:

  1. created branch A, and made some small changes
  2. staged and committed those changes
  3. made a small experimental change for something unrelated then stashed the change in favour of a later dedicated bit of work
  4. flipped to master and merged in branch A.
  5. created branch B. staged and merged to master again
  6. created branch C and applied the stash
  7. attempted to merge branch C to master

At this point I had merge conflicts. I was uncertain what the 3-way merge screen was telling me would happen, so I just wanted to abort the merge altogether - a small change easily applied.

I suspect my understanding of things is too shallow in this area and I need a bit of reading and some sacrificial merges. Thanks for the pointers.

0 Likes