Diff Base
Pin a base commit or branch per repository, then see every change against
that base — in the Explorer, in the editor, and on the scrollbar.
VS Code compares against HEAD. Diff Base compares against whatever you pin,
so you can review an entire branch's worth of work as one continuous delta
instead of only uncommitted changes.
Features
Per-repo base. Every git repository under your workspace is discovered
automatically, including nested ones, and each gets its own independent base.
Built for multi-root and monorepo-of-repos layouts.
Explorer decorations. Changed files are badged ⊕ added, ▸ modified,
⊖ deleted, ⇄ renamed. Parent folders are marked too, so a collapsed folder
still tells you something inside it changed.
Inline line highlighting. Changed lines get a full-line wash and a colored
left edge in the editor — no side-by-side diff needed.
Scrollbar markers. Changes appear in the overview ruler, so you can find
them in a long file without scrolling.
Per-repo colors. Assign each repository one of eight colors. Explorer
badges and editor highlights both follow it, so when you're reviewing across
several repos you always know which one a file belongs to.
Usage
- Open the Diff Base view from the Activity Bar.
- Click a repository to pick its base — a branch, tag, or recent commit.
- Use the paint-can icon to give a repository its own color.
Use Set Base for All Repos… in the view's title bar to pin one ref across
every repository at once.
Bases and colors are stored per workspace.
Settings
| Setting |
Default |
Description |
diffBase.scanDepth |
3 |
How deep to scan for git repositories |
diffBase.decorateExplorer |
true |
Show Explorer badges |
diffBase.highlightLines |
true |
Highlight changed lines in the editor |
diffBase.lineBackground |
"" |
Force one line color for all repos |
diffBase.rulerColor |
"" |
Force one scrollbar color for all repos |
The eight palette colors are themeable. To redefine one:
"workbench.colorCustomizations": {
"diffBase.palette.blue": "#7aa2f7",
"diffBase.palette.blue.dim": "#7aa2f799"
}
Known limitations
- Intra-line (word-level) diff is not implemented; highlighting is per line.
- Deleted lines are marked with a border on the surviving line above, since
there is no line to paint.
- Very large files (over 20,000 lines) skip line highlighting.
License
MIT