Branch DiffyA VS Code sidebar for PR review: see your checked-out branch's changes since its merge base with another branch, defaulting to Requirements
Supports local folders and remote extension hosts (WSL, SSH, and Dev Containers), but not virtual workspaces or VS Code for the Web. Node.js is only needed for development, not to use the extension. Use
The view refreshes when Git reports repository changes, when it becomes visible, or when you select Refresh. Workspaces with multiple repositories also get a Select Repository button. The selected comparison branch is remembered separately for each repository in the workspace. Folder hierarchyUse View as Tree in the Changed Files toolbar to group files into collapsible folders in both sections. Use View as List to return to the flat list with folder paths beside filenames. The flat list is the default; your choice is remembered for the workspace and applies to whichever repository you select. Filters, file counts, and file/diff actions work in either layout. Folders use Explorer's native expand/collapse arrows and inherit theme-aware colors and change indicators from their visible descendants. As in Explorer, deletions do not highlight parent folders. Each section is decorated independently, and Explorer's decoration color/badge settings apply. File filtersType glob patterns directly into the files to include and files to exclude text fields at the top of the Branch Diffy sidebar, like VS Code Search. The changed-file list updates as you type:
An empty include filter includes everything; exclusions always win. Both sections and their counts are filtered using the displayed file path (the new path for renames), including deleted files. Empty a text field to clear that filter, or use Clear File Filters in the File Filters header to reset both. Invalid patterns show an inline error and leave the last valid filter applied. The Files to Include… and Files to Exclude… commands focus the corresponding field. Filters are remembered for the workspace and apply to whichever repository you select. They only affect this view, not editor markers, Explorer decorations, Git ignore rules, or VS Code's Search settings. While a filter is active, section counts show the visible and total files, for example Committed changes (showing 5/11). Clearing both filters restores the normal count. By default, File Filters uses the minimum pane height and Changed Files takes the remaining space. You can drag the divider to resize them. VS Code remembers pane sizes, so these defaults do not override an existing workspace's saved layout. Native editor markersBranch Diffy starts automatically after VS Code finishes starting, without needing to open its sidebar, and enables native, theme-aware gutter markers for the selected repository: green for added lines, blue for modified lines, and red for deleted lines. Click a marker to see VS Code's inline change preview. Renamed files compare against their original path at the merge base. Branch markers show changes from the merge base to the index, mapped into the live editor. Unstaged and unsaved edits are incorporated into a synthetic, read-only merge-base baseline so the built-in Git provider can mark those edits normally. For example, a committed modification followed by an unstaged added line keeps a blue branch marker on the modification and Git's green marker on the addition. Local edits take precedence on overlapping lines; an independent branch edit sharing a local deletion's gutter anchor remains accessible through the inline preview's comparison dropdown. Staged changes remain part of the branch comparison. This does not modify files, commits, or the index. The branch marker's inline preview uses this adjusted baseline, not necessarily the exact merge-base contents. The Committed changes section and its Open Diff action remain committed-only and unadjusted; the separate Unstaged changes section shows local changes relative to the index. Entirely deleted files are still viewed through the sidebar or Open Diff, since they have no working-copy editor to mark. Very large or expensive text comparisons yield to native Git markers for that file; binary baselines remain byte-preserving. The status bar shows Branch Diffy: On with an open eye or Branch Diffy: Off with a crossed-out eye. Click it to toggle markers, even when the Branch Diffy sidebar is closed. The view-title button uses the same eye icons; hover either control to see the current state and what clicking will do. The Command Palette likewise shows Branch Diffy: Disable Branch Markers (Currently On) or Branch Diffy: Enable Branch Markers (Currently Off). Markers are on by default; the toggle is remembered for this workspace. Switching branches or repositories updates the baseline automatically. The While branch markers are enabled, files in the selected repository's Committed changes section also show Git-style status letters (such as M for modified) and theme-aware status colors in Explorer. These decorations propagate to parent folders using VS Code's native Git-style folder highlighting and change indicators, except for deletions, which do not decorate parent folders. Turning markers off removes the branch colors, badges, and folder indicators without changing the sidebar's status badges or native Git decorations. Local-only changes and files belonging to nested repositories are not branch-decorated. Native integration adds a separate Branch Diffy (branch-name) provider in Source Control, with its commit input hidden. It does not replace the built-in Git provider, change Git settings, or inflate the Source Control change count. If a change preview offers multiple baselines, choose Branch Diffy (branch-name) for the branch comparison. Markers follow VS Code's What is compared?The Committed changes section compares the merge base (common ancestor) of the selected comparison branch and The Unstaged changes section works like Source Control's Changes list: saved modifications and deletions of tracked files, untracked files, and further edits to files that already have staged changes. Staged-only changes are excluded. Staging all changes to a file removes it from this section; editing it again brings it back. The list reflects saved on-disk changes, but an open diff also follows unsaved editor contents. Unresolved conflicts are shown with ! and use the merge's “ours” version as their diff baseline. Untracked files respect Remote branches use already-fetched local references; the extension never fetches, checks out branches, or changes your repository. If Settings
This controls the initial branch for repositories without a remembered selection. Use the branch picker to change an existing selection. Known limitationsOn VS Code 1.95.3, the native diff engine displays committed new files with blue modified gutter markers instead of green added markers. Their sidebar and Explorer status remains A, and their committed diff correctly has an empty baseline. This is a native quick-diff limitation; the extension does not replace VS Code's marker renderer. DevelopRequires Node.js 22+ and Git in addition to the requirements above.
Open this folder in VS Code and press F5 to start an Extension Development Host, then open a Git repository there.
Set On Windows PowerShell, use Install locally
Alternatively use Extensions: Install from VSIX… in VS Code. Packaging does not publish the extension. |