Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Git Compare File With BranchNew to Visual Studio Code? Get it now.
Git Compare File With Branch

Git Compare File With Branch

Andrew Kodkod

|
3 installs
| (0) | Free
Quickly compare your current file with the same file from any Git branch
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git Compare File With Branch

Quickly compare your current file with the same file from any Git branch directly in VS Code.

Features

  • Single Command: Access everything through one simple command: Git Compare File With Branch...
  • Branch Selection: Choose from all available branches (local and remote) via an intuitive quick pick menu
  • Side-by-Side Diff: Opens VS Code's native diff view to compare your current file with the version from the selected branch
  • Smart Error Handling: Clear error messages when files don't exist in the selected branch or other issues occur
  • Works with Large Files: Supports files up to 10MB

Usage

  1. Open any file in a Git repository
  2. Open the Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux)
  3. Type and select: Git Compare File With Branch...
  4. Select the branch you want to compare with from the list
  5. View the side-by-side comparison in VS Code's diff viewer

Requirements

  • Git must be installed and available in your PATH
  • Your file must be in a Git repository

Extension Settings

This extension does not contribute any settings. It works out of the box!

Known Issues

  • Large files (>10MB) may cause performance issues
  • Binary files are not supported for comparison

Release Notes

1.0.2

  • Compress icon

1.0.1

  • Fix links in README
  • Remove noise from README
  • Update name in LICENSE

1.0.0

Initial release of Git Compare File With Branch:

  • Compare current file with any branch
  • Quick branch selection interface
  • Side-by-side diff view
  • Support for local and remote branches

Contributing

Found a bug or have a feature request? Please open an issue on GitHub.

License

MIT

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft