[FEATURE] Support diff comparison against branches other than main

Open 💬 30 comments Opened Feb 6, 2026 by okurashoichi

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When using the Claude Code desktop app, the diff view only shows changes compared to the main branch. There is no option to compare against other branches (e.g., a parent feature branch).

In many development workflows, developers create sub-branches from feature branches, not from main. In this case, the diff against main includes all changes from the parent feature branch as well, making it difficult to review only the incremental changes made on the current branch.

Proposed Solution

Allow users to select the base branch for diff comparison, rather than always defaulting to main. For example, a dropdown or configuration option to choose which branch to diff against would be very helpful.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Other

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

30 Comments

github-actions[bot] · 5 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/19527

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

p134c0d3 · 4 months ago

I would almost classify this as a bug rather than an enhancement @okurashoichi . When clicking the main branch (base branch), it drops down a menu as if you are supposed to be able to select other branches, I just get an "unable to load branches" error every single time (nothing is wrong with my network connection either).

<img width="428" height="246" alt="Image" src="https://github.com/user-attachments/assets/4e98c830-041e-4c58-9298-6d99c477c8df" />

shawwn · 4 months ago

I too am trying to compare against a different branch besides the main branch, and can't. This is pretty frustrating, since the UI is showing 541,973 lines changed instead of zero.

<img width="701" height="207" alt="Image" src="https://github.com/user-attachments/assets/a71da133-33b9-4acf-96a6-866db94ada34" />

sergioironhack · 4 months ago

I thought I was the only one with this issue or that I was using the feature incorrectly. Exactly what @shawwn captured.

servatti · 4 months ago

Needed! +1

bradley-carestia-jbh · 3 months ago

More than that, I'd prefer the diff to simply be against HEAD. I want to review just the uncommitted changes I'm working on with the AI. Not everything possible that's been going on in the branch.

pereiraa15 · 3 months ago
More than that, I'd prefer the diff to simply be against HEAD. I want to review just the uncommitted changes I'm working on with the AI. Not everything possible that's been going on in the branch.

This would be amazing. +1 here
Also my Claude Desktop app is totally unusable with the current behavior. The diff to the main branch in big enough codebases is often huge and for me opening the diff panel simply crashes the Claude Desktop app.

pkranjcecx · 2 months ago

This is needed feature. This is why I still use Codex instead of Claude code.

danielo515 · 2 months ago

We're paying quite big subscriptions for a product which problems are being ignored by a company that, in theory, has access to god level models. This is a serious issue that makes this useless for any serious work

ChaeHyunIM · 2 months ago

I'm genuinely confused about the current state of diff in Claude Code Desktop.

You've been heavily promoting parallel agent workflows with git worktrees — it's practically a flagship use case. But the diff view still only works against the main/master branch, which means it assumes your working branch IS your production branch. That's not how any real-world dev team operates.

The overwhelming majority of developers work on feature branches cut from a non-production base (develop, staging, trunk, whatever you call it). Worktree-based parallel agent workflows make this even more pronounced — each worktree is on its own branch by definition.

So I genuinely don't understand: if the diff can't resolve the correct base branch contextually, what's it actually showing? Diffs against main when you're three branches deep in a worktree are close to meaningless.

In the agentic coding era, being able to review what the agent actually changed — cleanly and accurately — is arguably THE most critical human-in-the-loop touchpoint. A diff view that doesn't work in the workflows you're actively encouraging feels like a pretty fundamental gap.

Not trying to be harsh, just actually confused about what I'm missing here. Is there a workaround, or is this a known limitation on the roadmap?

jspdown · 1 month ago

The feature in its current state isn't usable for my workflow or for the rest of my company. Everyone has their own fork, and the diff appears to compare against origin rather than upstream/main.

alfeg · 1 month ago

Our team uses release branches as the integration target, and the base shifts with the release cadence:

  • Feature work -> current release branch (e.g. release/v4.24.0, so called maintenance releases)
  • Hotfixes -> previous release branch (e.g. release/v4.23.x)
  • Bigger epics -> develop branch

Whenever the version rolls forward, the base for new feature branches moves with it. main/master is essentially never the right comparison target for us.

Strong +1 on a UI control. Even a simple "click the branch name in the diff header to pick a different one" per session would be enough.

fm1randa · 1 month ago

Not being able to customize the diff comparison branch is pretty frustrating. We work with branches as enviroments and main is VERY different from develop (which we work on)

<img width="273" height="121" alt="Image" src="https://github.com/user-attachments/assets/f14b326b-d8c8-41f0-a49b-fde2399a35b0" />

Yedev · 1 month ago

+1 for this feature. Would love to be able to choose the base branch for diff comparison instead of always defaulting to main.

marybrians-ixd · 1 month ago

Use case: Teams with a feature → dev → staging → main flow. I start a web/mobile session from dev and my PR targets dev, but the session Diff view compares against main, so it shows ~15k lines (all of dev‘s already-merged history) instead of my ~600-line change. This makes the in-app diff unusable for review on any repo where the default branch isn’t the integration branch.
Request: Either (a) a control to pick the diff base branch, or (b) — better as a default — diff against the branch the session was started from / the PR’s base branch, rather than the repo’s default branch.

TasukuMatsuura · 1 month ago

This is also related to the following bug reports that were ignored during automated processing.
There are many other related issues as well.
I hope you can address this soon.
Thank you for your attention.

#51496
#48200
#45784
#27134
#61025
#48200
#61025
#48200

davidgilbertson · 1 month ago

In Codex, I was used to being able to see a diff against main, (my local main, of course, because it's insane to compare against origin/main), but also to be able to see a diff of just what was changed in the last turn, which as you're doing a review on a fairly big change, is really useful. Boggles the mind that the default in Claude Code is both illogical and that this issue is wanted by so many people, but ignored.
It's also frustrating to see all the other auto-closed issues. The ones that are closed as duplicates is understandable. The ones that are closed as "not planned" just gives the wrong (extremely frustrating) impression.

ryanwg77 · 1 month ago

+1 for this feature. Choosing another base branch will significantly clean up the diff UI

mynavitechtus-thongtv · 28 days ago

Waiting for this features because I'm working in multiple feature branches

Starkxim · 21 days ago

I really need this feature. Not being able to customize the branches for comparison is too strange and has caused confusion. If the selection feature isn't going to be developed, it would be better not to show the diff at all.

polym · 20 days ago

Voted for the feature 👍

benpoieszHV · 15 days ago

+1 on this feature, would be a huge quality of life improvement to use the built-in diff

fgomulkiewicz · 14 days ago

+1 for this feature

veber-alex · 12 days ago

+1 Please add this including comparing to HEAD.

I want to be able to see the changes the AI did just in this session without all the other stuff on this branch.

ScobarDen · 9 days ago

Реально, очень нужно!

akshatSNC · 8 days ago
More than that, I'd prefer the diff to simply be against HEAD. I want to review just the uncommitted changes I'm working on with the AI. Not everything possible that's been going on in the branch.

Exactly. This "feature" is so asinine that it's clear it has been designed by someone who either doesn't know how GIT is used or hasn't used it enough to know what the relevant information would be.

aalexandrov · 7 days ago

👍🏻 for this feature. It breaks my user flow and I have to actively switch back between my IDE and Claude Code just to review the relevant diff of the code generated from the current session.

To put it differently:

  • If this feature was implemented, I could spend 2 hours comping up with a detailed spec and implementation breakdown on my PC, and then the next hour or so reviewing the diff of every point from my phone. With the current behavior, I have to sit on my PC for the reviews because I need a proper diff viewer from another applicaiton.
anivaros · 1 day ago

Steal the implementation of this feature from the Codex app if you can't come up with it yourself - this feature is much more conveniently implemented there.

oleksandrhrytsenko-cyber · 23 hours ago

Very annoying issue

DominiquePijnenburg · 8 hours ago

Adding a concrete case for this. Our repo branches all feature work off release/1.0.0, not main — main is essentially stale (613 commits behind release/1.0.0, 0 ahead). Every feature branch's diff panel in the app compares against main regardless, which means it shows the entire divergence between the two branches as "my changes":

git diff main...HEAD --shortstat
# 351 files changed, 64552 insertions(+), 62780 deletions(-)
git diff release/1.0.0...HEAD --shortstat
# 4 files changed, 134 insertions(+), 2 deletions(-)

The actual diff for the branch is 4 files / ~130 lines. The panel reports something closer to 65,000 changed lines, which makes the diff view completely unusable for reviewing what a session actually did.

git remote show origin reports HEAD branch: main, and the app appears to hardcode that as the comparison base rather than reading anything branch-specific (e.g. the upstream tracking branch, or VS Code's own branch.<name>.vscode-merge-base config, which in our case is already correctly set to release/1.0.0). A per-branch override — or just respecting the existing merge-base config — would fix this without needing new UI.

<img width="152" height="41" alt="Image" src="https://github.com/user-attachments/assets/1a6fb83d-033d-4a76-b50d-04c7949f9a23" />