Sublime Forum

Interactive/selective merge branch?

#1

Forgive the noob questions, but–is there a way to quickly view the diff between the current branch & another in sublime merge? So–same info you get from:

git diff main..other_branch

except pretty in the sublime merge GUI.

What I’d really like is to see those diffs w/the ability to cherry-pick individual hunks of the diff for staging into a new commit on the currently-checked-out branch, same as if the other branch represented the current state of my working dir.

Hopefully that’s intelligible…

0 Likes

#2

Comparing two branches is as easy as holding ctrl while selecting the two head commits.

Cherry picking code hunks is still an open feature request, if I haven’t missed anything.

1 Like

#3

Woah–that is super easy–thanks!

So how dumb should I feel for not intuiting that/reading it in docs? Where would I go to find out the other features that I’m probably not intuiting and would make my life easier?

0 Likes

#4

The official Sublime Merge docs are still fairly barebones and I am unaware of any community docs like there are for Sublime Text. However, you are free to ask questions on this forum for help, advice, or really anything.

One of the most missed feature is the ability to stage lines instead of files or hunks. First mentioned here and most recently requested here, it’s a hidden feature until you select lines inside of a diff hunk which causes the Stage Hunk to switch to Stage Lines. This behavior is also seen with the somewhat recent revert feature.


Shameless plug: I have a lot of SM related forum comments that could prove to be useful for you. The SM issue tracker can also be useful to peruse. Of which, I also have a lot of comments on often for workarounds (or linking related issues) as seen in the revert feature link above.

1 Like