Git Range Diff
Make git range-diff readable. Compare two versions of a commit series — before and after a rebase, two iterations of a pull request, or your local branch vs. what you pushed — and see exactly what changed in each commit.

Why this exists: vibe-coded large rebases
AI agents now happily rebase, split, squash and rewrite a 20-commit branch in one go — resolving conflicts, re-ordering commits and "fixing up" history along the way. The result usually looks fine, but you have no idea what actually changed in each commit, and git diff old new only shows the final tree, not what happened to every individual commit.
git range-diff answers exactly that question, but its raw output — diffs of diffs with two columns of +/- markers and no colours you can trust — is painful to read for anything bigger than a couple of commits. This extension turns it into something you can review the way you review a pull request: commit by commit, file by file, with syntax highlighting and a side-by-side view, so you can verify that a vibe-coded rebase didn't silently drop, duplicate or rewrite something it shouldn't have.
In the screenshot above, the "same" Add LRU cache commit after the rebase evicts one entry too early (> became >=) and no longer refreshes an existing key — the kind of change that slips through when you only skim the final diff.
Features
- Range Diff view in Source Control — every commit pair with its status:
= unchanged · ! modified · > added in the new range · < dropped from the old range
- expand a modified pair to see which files (and whether the commit message) changed.
- Diff-of-diffs viewer — the range-diff for each pair, rendered with:
- an outer gutter bar for lines that only exist in the old (red) or new (green) version of the patch,
- the commit's own
+/− markers in a separate column,
- syntax highlighting based on the file type, adapted to light, dark and high-contrast themes.
- Side-by-side — open any file (or all files of a pair in the multi-file diff editor) comparing the old commit with the new commit, with full editor features.
- Quick comparisons:
- before vs. after the last rewrite of the current branch (
branch@{1}...branch),
- any earlier version from the reflog,
- upstream vs. local (
@{upstream}...HEAD),
- two branches on a common base (
base old new),
- custom
git range-diff arguments,
- recently used comparisons.
Screenshots
Commit message and code changes in one place — the rebased commit gained an explanation and an extra counter:

Dropped and added commits — see the full patch of a commit that disappeared in the rewrite:

Side-by-side — open any file in VS Code's diff editor, old commit vs. new commit:

Pick what to compare — last rewrite, reflog, upstream, two branches or custom ranges:

Usage
- Open the Source Control view and find the Range Diff section, or run Range Diff: Compare Commit Ranges… from the Command Palette.
- Pick what to compare.
- Click a commit pair to open it in the viewer; click a file to open it side-by-side.
Viewer keyboard shortcuts
| Key |
Action |
j / k |
next / previous commit pair |
n / p |
next / previous file |
s |
open the pair side-by-side |
u |
hide / show unchanged pairs |
w |
toggle line wrapping |
Reading the diff-of-diffs
▌ export function start(port: number) { ← context in both patches
▌ − export function start(port: number) { ← the commit removes this line (both versions)
−▌ + export function start(port, host = 'localhost') ← old patch added this…
+▌ + export function start(port, host = '127.0.0.1') ← …new patch adds this instead
The left column (outer marker) tells you how the patch changed; the second column (inner marker) is the commit's own change to the code.
Settings
| Setting |
Default |
Description |
rangeDiff.creationFactor |
60 |
--creation-factor for pairing commits |
rangeDiff.hideUnchangedByDefault |
false |
hide = pairs when a comparison loads |
rangeDiff.extraArgs |
[] |
extra arguments for git range-diff (e.g. --no-notes) |
rangeDiff.gitPath |
git |
path to the git executable |
Requirements
Git 2.19 or newer (for git range-diff).
Development
npm install
npm run build # bundle extension + webview into dist/
npm test # parser unit tests
npm run package # produce a .vsix
./install.sh # package and install into VS Code / Cursor
./publish.sh # publish to the Marketplace
Press F5 in VS Code to launch an Extension Development Host.