Skip to content

Conversation

@ConradIrwin
Copy link
Member

@ConradIrwin ConradIrwin commented Oct 14, 2025

Note: It would be really nice if we could also show this information in the git panel, but the branch was getting long lived so I wanted to merge as is.

Release Notes:

  • git: Adds the ability to view the diff of the current branch since main with git: Branch Diff from the command palette

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 14, 2025
@iamnbutler
Copy link
Contributor

Oh my god. I want this so bad. I wanted this desperately this week.

Thank you for pushing on this 🙏

@ConradIrwin ConradIrwin marked this pull request as ready for review October 23, 2025 23:05
@ConradIrwin ConradIrwin force-pushed the branch-diff-2 branch 2 times, most recently from 0a00511 to 88914dc Compare October 24, 2025 04:15
@ConradIrwin ConradIrwin merged commit f45a9b3 into main Oct 24, 2025
52 of 62 checks passed
@ConradIrwin ConradIrwin deleted the branch-diff-2 branch October 24, 2025 04:38
@gpxl-dev
Copy link

gpxl-dev commented Nov 6, 2025

This is wonderful, obvious improvement to this feature would be to be able to select the branch to diff with, or at least have a setting to specify it

@birtles
Copy link

birtles commented Nov 6, 2025

For anyone else coming here because this seems to pull up the wrong default branch, in my case it turned out to be because there was a different default branch in place at the point when I cloned the repository.

Internally it looks like Zed calls git symbolic-ref refs/remotes/origin/HEAD and uses the result of that if successful.

The get your local clone to reflect the updated default branch of the origin:

git remote set-head origin -a

@smackesey
Copy link

This is wonderful, obvious improvement to this feature would be to be able to select the branch to diff with, or at least have a setting to specify it

To add to this, ideally the branch could be dynamically determined. Users of stacked branch systems like Graphite often want to view the diff of the current branch against the parent branch. I'm a graphite user and I do this in the terminal using git difftool $(gt parent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants