Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Compare Branch — AI Code Review & Git DiffNew to Visual Studio Code? Get it now.
Compare Branch — AI Code Review & Git Diff

Compare Branch — AI Code Review & Git Diff

Goodfoot Media LLC

|
122 installs
| (0) | Free
Lightning-fast branch comparison and AI code review with tree view. Essential for parallel development with git worktrees. Perfect for Claude Code, Cursor, Windsurf, Copilot, Cline & Aider workflows.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Review your branch changes like a pull request—without leaving VS Code. See every file difference between your working branch and main in a searchable tree view, just like reviewing a PR on GitHub.

Compare git branches in VS Code - automatic upstream branch detection with manual override for pull request preview

Perfect for validating AI-generated code, previewing your PR before pushing, or reviewing work-in-progress changes.


Built for AI Coding Workflows

Modern AI assistants can modify 10-50+ files in seconds. Compare Branch gives you a comprehensive view of all changes before you merge.

Common challenges this solves:

  • Volume overwhelm — Terminal diffs become unmanageable with 50+ modified files
  • Context switching — Stay in your IDE instead of switching to terminal for review
  • Validation requirements — Verify AI-generated code file-by-file before merging

Works seamlessly with:

  • Claude Code — Anthropic's terminal-based coding agent
  • GitHub Copilot — Industry-standard AI pair programmer
  • Cursor — AI-integrated code editor
  • Windsurf — Collaborative AI development environment
  • Cline — Open-source VS Code AI agent
  • Aider — Terminal-based AI pair programming
  • Continue — Privacy-focused AI assistant with local models
  • Bolt.new — Browser-based AI coding platform

Key Features

🔍 Search & Filter Changed Files

Search changed files in VS Code branch comparison - find specific files in large AI-generated changesets quickly

Instantly find specific files in large changesets. Filter by status (modified, added, deleted, renamed) to focus your review.

🌳 Dual View Modes

Git diff tree view modes - switch between changed files only and complete directory tree with changes highlighted

Toggle between "Changed Files" for focused review or "All Files" to see changes within your complete directory structure.

⚡ Auto-Detection & Zero Configuration

VS Code git diff viewer - compare branches with side-by-side file comparison and tree view navigation

Automatically detects your upstream branch (main, develop, etc.) with one-click manual override when needed. No configuration required.

📌 Pin Current Commit as Baseline

Pin current commit as baseline - lock comparison point for tracking cumulative changes

One-click pinning of your current HEAD commit as a fixed comparison baseline. Track all subsequent changes from a known-good state, perfect for monitoring cumulative progress during iterative development or AI-assisted coding sessions.

🎯 Status-Based Filtering

Filter git changes by status - show only modified, added, deleted, or renamed files in branch comparison

Focus on specific change types: modified, added, deleted, or renamed files.


Why Choose Compare Branch?

Comparison with Alternatives

Capability Compare Branch GitLens Git Tree Compare
Primary focus Branch comparison Complete git suite Basic tree view
Performance Optimized for speed Feature-comprehensive Fast
AI workflow support Purpose-built General-purpose Not optimized
Auto-detect upstream ✅ Yes ⚠️ Partial ❌ No
Search in changed files ✅ Yes ❌ No ❌ No
Status filtering ✅ Yes ❌ No ❌ No
Progressive loading ✅ Yes ⚠️ Limited ⚠️ Limited
Pricing Free $0-19/mo Free
Startup impact None Measurable Minimal

Key Advantages

⚡ Speed & Performance Progressive loading handles repositories with 10,000+ files without lag. Non-blocking activation ensures zero impact on VS Code startup time.

🔒 Privacy Operates entirely locally. No cloud services, no telemetry, no external dependencies.

🎯 Simplicity Single-purpose tool focused on branch comparison. No feature bloat, no complex configuration.

🌐 Universal Compatibility Works with all VS Code-based editors (Cursor, Windsurf, VSCodium) and available on both VS Code Marketplace and Open VSX Registry.

🤖 AI Workflow Optimization Auto-refresh for agent-generated commits. Review while agents continue working. Designed specifically for multi-file changeset review.


Workflow Benefits

Pre-execution Review

Verify your branch state before delegating work to an AI agent. Ensure you're starting from the correct baseline.

Post-execution Validation

Review all AI-generated modifications in a unified tree view. Navigate file-by-file to validate changes before merging.

Real-time Monitoring

Auto-refresh as commits are created. Review live while AI agents continue working. Non-blocking architecture ensures no performance impact.

Multi-branch Workflows

For teams using git worktrees to run parallel AI agents, Compare Branch enables side-by-side comparison across different working directories.


Commands

Access via Command Palette (Cmd+Shift+P or Ctrl+Shift+P):

  • Compare Branch: Change Source Branch — Select a different comparison target
  • Compare Branch: Enable Auto-Detect Source Branch — Return to automatic upstream detection
  • Compare Branch: Refresh — Manually trigger view refresh
  • Compare Branch: Switch to All Files Mode — Display complete file tree
  • Compare Branch: Switch to Changed Files Mode — Display only modified files

Advanced Features

Progressive Loading

Handles massive repositories (tested with 10,000+ files) without performance degradation. Git operations are cached for optimal responsiveness.

Intelligent Branch Detection

Automatically reads upstream branch configuration from git, typically identifying main, develop, or master as the comparison target. Manual override available for custom workflows.

Visual Organization

Files display in a hierarchical directory tree with clear status indicators:

  • M (Modified)
  • A (Added)
  • D (Deleted)
  • R (Renamed)
  • C (Copied)
  • T (Type Changed)
  • U (Conflicted)

File Operations

  • Single-click diff viewing
  • Right-click context menus for standard operations (open, compare, copy path, reveal in explorer)
  • Multi-file selection support
  • Drag-and-drop functionality
  • Keyboard shortcuts for common actions

Auto-refresh

Filesystem and git state monitoring triggers automatic view updates when branches change, commits occur, or files are modified.


Platform Compatibility

Compatible with all VS Code-based editors:

  • Visual Studio Code
  • Cursor
  • Windsurf
  • VSCodium
  • Other VS Code forks

Also available on Open VSX Registry for VSCodium and privacy-focused distributions.


Frequently Asked Questions

Does this work with AI coding assistants? Yes. The extension monitors git state and works with any tool that creates commits, including all major AI coding platforms.

How does this differ from terminal git diff? Terminal diffs work well for small changes. For reviewing modifications across many files and directories, a tree-based visual interface provides superior navigation and context.

Can I use this while an AI agent is working? Yes. The extension uses a non-blocking architecture and updates automatically as new commits are created.

How does this differ from GitLens? GitLens provides comprehensive git functionality across history, blame, and collaboration. Compare Branch focuses specifically on branch comparison. Choose based on your workflow requirements.

Can I compare any two branches? Yes. Use the "Change Source Branch" command to select any branch, commit, or tag for comparison.

Does it support large repositories? Yes. Progressive loading maintains responsiveness with repositories containing 10,000+ files.

Can I view diffs for deleted files? Yes. Clicking a deleted file displays the diff showing removed content.

Is this compatible with VS Code forks? Yes. Works with Cursor, Windsurf, VSCodium, and other VS Code-based editors. Also available on Open VSX Registry.

Does this work with monorepos? Yes. Supports any git repository structure.


Support & Resources

Community support: GitHub Discussions

Bug reports: GitHub Issues

Documentation: GitHub Repository

Security: Security Policy

Reporting Issues

When reporting bugs, please include:

  • VS Code version
  • Operating system
  • Steps to reproduce
  • Expected vs. actual behavior
  • Screenshots (if applicable)

Check for existing issues before creating new reports.


License

Proprietary software. Copyright © 2025 Goodfoot Media LLC.

See LICENSE for complete terms.

Summary:

  • ✅ Personal and commercial use permitted
  • ✅ Use in unlimited projects
  • ❌ No source code access
  • ❌ No redistribution
  • ❌ No reverse engineering

About

Developed by: Goodfoot Media LLC

Technologies: TypeScript, VS Code Extension API, simple-git, chokidar


Links

  • Visual Studio Marketplace
  • Open VSX Registry
  • GitHub Repository
  • Release Notes
  • GitHub Discussions
  • Issue Tracker
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft