IntelliJ-Style “Compare With Branch” and Selective Code Merge

I would love to have a side-by-side comparison feature in Cursor that mirrors IntelliJ’s “Compare with Branch” functionality. Specifically:

  1. Side-by-Side Diff of Two Branches
  • Ability to open two branches in a single diff view, listing all changed files and showing a line-by-line comparison.
  1. Interactive, Selective Change Application
  • While viewing the diff, I’d like to pick and apply specific lines or code blocks from one side (branch) to the other. This is particularly useful when I only need partial changes or want to cherry-pick certain fixes.
  1. Intuitive Merge UI
  • For any conflicts, having a clear UI with buttons (e.g., Accept Left/Right/Both) would speed up conflict resolution without leaving the IDE or resorting to manual git commands.

Why It’s Useful:

  • Productivity: Eliminates the need to jump between external diff tools or rely solely on command-line merges.

  • Code Review & Partial Merges: Quickly apply bits of changes from feature branches without merging the entire branch.

  • Consistency: IntelliJ users (and those from similar IDEs) expect this workflow in their day-to-day.

Possible Implementation Ideas:

  • A new command in the Command Palette, e.g., “Compare Current Branch” with that opens a dedicated side-by-side viewer.

  • Buttons or hover-over icons in the diff to “Accept from Left/Right” on a per-line or per-block basis.

  • Integration with the existing source control panel for a seamless Git experience.

Let me know if there’s more detail I can provide or if I can help in testing! This feature would make Cursor even more powerful for teams coming from tools like IntelliJ or advanced diff/merge GUIs.

Thanks for the suggestion.

Cursor (and it’s extensions) can likely do a very similar job.
Theres a few suggestions here which may be what you are looking for:

Indeed, I followed this. But we can’t edit the current file, applying the changes one by one, like in Intellij. The GitLens is read-only unfortunately.
I would be happy in helping to bring in this feature, I’m just not American :smiley:

There is a similar feature in Cursor, but only when you are resolving merge conflicts:

I understand. The only problem is that we can only use once we already merge a bunch of stuff all together. If you just want to take a look in some different branch, compare and fix a particular issue that doesn’t happen in this new branch, due to only one file, you can’t.
We can do this with IntelliJ in anytime.

Unfortunately it seems to be something related to how vscode handles all diffs, even if you try to compare between files, or with clipboard, it’s always one-sided.

This is a big drawback and if you came from IntelliJ / JetBrains environments it’s one of the things you really miss when moving to vscode, but for some reason, while there are many open issues related to this on github it seems like it’s not something they’ve implemented yet:

1 Like