See how big your branch is at a glance. Branch Diff Stats puts the lines you've added and deleted in the VS Code status bar:
It fits in with any theme:
What it counts
Every change on your branch since it left its base: committed, staged and unstaged.
Base: the pull request's target branch if the branch has an open PR (needs the GitHub CLI, gh, signed in), otherwise the repo's default branch (origin/HEAD, then origin/main / origin/master).
New files that git isn't tracking yet are not counted until you git add them.
Hover the item to see the branch, the base and the PR number. Click it to open Source Control.
When it updates
On save, commit, stage, branch switch, when you switch editors or come back to the window, and every 30 seconds. In a multi-root workspace it follows the repo of the file you're editing.
Settings
Setting
Default
What it does
branchDiffStats.icon
git-compare
Codicon shown before the counts, e.g. diff, git-pull-request, source-control.
Commands
Branch Diff Stats: Refresh re-checks the branch's base and counts again, for example right after you open a PR.
Works with
Local folders, WSL, SSH and Dev Containers: the extension runs where your repo is.