[Bug / FR] : AI Review : "Diff with main" : allow selecting other branch to compare to (master, dev, prod...)
I don't even have a main branch sometimes
Indeed. Would be particularly useful for reviewing PRs. Currently I have to checkout PR, do a git reset <base commit> and then the "run on working diff"... not super practical
Maybe I need some handholding here but I can't even figure out how to use this thing:
- I created a
mainbranch. - Checked out the branch I want to compare it to.
- Refreshed git context
- Pressed "Review Diff with Main Branch"
and nada. Where do I tell Cursor which my main branch is?
Same, to review a pull request, I need to check diffs against "dev" branch, not main
🙏 Please!
This would be nice.
This would be so helpful
👍
Any updates on this? Still very interested in seeing it addressed.
What does @Git even do in Cursor? The description on their website seems very vague. Can I tell the Agent to run diffs against any branch I select and then have the Agent compare the current state of the codebase with the selected remote branch?
This seems broken atm. Even for a PR against main this does not work at all for me at the moment.
Repro case:
- Check out a feature branch and make some changes
- Go to Cursor Chat and type
@branch Please review the attached diff against the main branch and tell me what I can improve - See that Cursor's Agent doesn't actually seem to see the diff. Regardless of which model I try, it always starts by trying to manually get a diff via varieties of
git diff -name-status mainetc
fwiw the typical response I get is something like "I'll help review the diff, but I notice that no actual diff content was provided in the message. To properly review the changes between the current working branch and main branch, I'll need to see the actual diff content."
I'm on Cursor 0.5 on macOS 15.5
This is essential, comparison against main is fairly useless for most of my use cases. I generally need to compare against dev or a feature branch. So being able to select a branch is a big +1
Hmm. A bit weird that such a tiny feature has been lingering for almost a year. Is there something else holding this feature back? I cant use the review feature if I cant do it against "dev". There must be so many user that cant use this feature.
Is there perhaps some kind of workaround that people are using?
I definitely think this should be a configurable option.
Often the main branch especially for those not doing continuous integration into production/staging from main is done on a dev branch or a release branch - especially so for those still following gitflow practices and weekly releases which is still very popular.
The "Agent review against main" or "diff with main" is often useless in these scenarios.