Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Branch Diff ViewNew to Visual Studio Code? Get it now.
Branch Diff View

Branch Diff View

breengles

|
1 install
| (0) | Free
Open the full PR-style diff between the current branch and its base (main/master) in one multi-file diff view.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Branch Diff View icon

Branch Diff View

A tiny VS Code / Cursor extension that opens the full diff between the current branch and its base branch in a single multi-file diff view.

Install

From a .vsix

This extension is published to the VS Code Marketplace only, not Open VSX, so editors that use Open VSX (Cursor, VSCodium, Windsurf) install it from the .vsix instead. Every release attaches one to the GitLab Releases page. Download it and:

code --install-extension branch-diff-view-*.vsix    # or, in Cursor: "Install from VSIX..."

From source (make)

Clone the repo and build + install the .vsix locally with the bundled Makefile (needs Node.js and the code CLI on PATH):

git clone https://gitlab.com/breengles/vscode-branch-diff.git
cd vscode-branch-diff
make install            # build branch-diff-view.vsix and install it (use CODE=cursor for Cursor)

Then run Developer: Reload Window to activate. Re-run make install after changes; remove it with make uninstall.

Usage

In the Source Control view there is a collapsible Branch Diff View section (alongside Changes / Graph). It shows a file tree of every change against the base branch for the current mode. Click a file to open its diff.

The section title bar has:

  • Toggle Mode ($(arrow-swap)) -- switch between the two modes; the current one is shown next to the title (committed / working tree) and remembered per workspace.
  • Open All Changes in Diff Editor ($(diff-multiple)) -- open every change for the current mode in one multi-file diff editor.
  • Refresh ($(refresh)). The tree also refreshes automatically on git activity (commits, staging, edits).

Modes

Mode Shows
committed merge-base(base, HEAD) vs HEAD -- committed diff only (three-dot, PR-style).
working tree merge-base(base, HEAD) vs the current working tree -- committed + staged + unstaged + untracked.

Commands

All are under the "Branch Diff View" category in the Command Palette; the two show* commands also sit in the Source Control view title bar.

Command / ID Action
branchDiffView.showDiff Open the committed multi-file diff.
branchDiffView.showDiffWithWorkingTree Open the working-tree multi-file diff.
branchDiffView.toggleMode / branchDiffView.openAll / branchDiffView.refresh Drive the Branch Diff View (title bar).

Optionally bind keys in your keybindings.json:

{ "key": "cmd+alt+d", "command": "branchDiffView.showDiff" },
{ "key": "cmd+alt+shift+d", "command": "branchDiffView.showDiffWithWorkingTree" }

Configuration

Setting Default Description
branchDiffView.baseBranch "" Branch to diff against. Empty = auto-detect (main, then master, incl. origin/ variants).

Development

The extension source is a single extension.js; there is nothing to compile. The dev dependencies exist only to package and cut releases.

npm ci               # install the release toolchain
npm run package      # build a local branch-diff-view-<version>.vsix with vsce
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft