Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Better Git DiffNew to Visual Studio Code? Get it now.
Better Git Diff

Better Git Diff

jievince

| (0) | Free
Compare current Git branch changes against a base branch or recent commit in a clean diff tree.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Better Git Diff

English | 中文

A lightweight VS Code diff sidebar inspired by modern coding-agent apps, built to make reviewing AI-authored and local Git changes fast and clear.

4 Ways to Review Diffs

Switch comparison scopes directly from the top dropdown:

  1. Branch (default) — Review all changes on the current branch against its base branch (auto-detects upstream/master, origin/main, etc. via merge-base, or switch to direct in settings).
  2. Committed — Review a single commit in one click, or check a start and end commit to inspect the cumulative diff across a commit range.
  3. Uncommitted — Review all current working-tree changes against HEAD (staged + unstaged + untracked).
  4. Unstaged / Staged — Inspect working-tree changes vs index (Unstaged) or staged changes vs HEAD (Staged), with quick Stage / Unstage / Discard actions.

Highlights

  • Compact diff tree & list: Collapsible folder tree with Git status badges (A / M / D / R / U) and per-file +N -N line counts, plus flat list view, filename filter, and sorting (Path / Changes / Status).
  • Native VS Code diffs: Click any file to open the built-in side-by-side diff editor, or open all changed files in a single PR-style multi-file diff view.
  • Inline review comments for AI: Leave comments in the diff editor gutter and copy them as numbered Markdown with file/line references and code snippets to paste directly back to your AI agent.
  • Multi-worktree support: Switch Git worktrees from the toolbar whenever the repository has multiple worktrees.

Settings

  • betterGitDiff.branchDiffMode: mergeBase (default) or direct.
  • betterGitDiff.language: auto (default), en, or zh.

License & Attribution

MIT License. Based on vscode-git-tree-compare by Maik Riechert.

Source code: jievince/vscode-better-git-diff

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft