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

Git Diff Review

gbytl

|
3 installs
| (0) | Free
Review working-tree changes against a Git branch or tag, file by file and hunk by hunk.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git Diff Review

Review the working tree against a local or remote-tracking Git branch, or a Git tag, in a dedicated side-by-side review panel. The extension UI follows the VS Code display language. English and Simplified Chinese are included; other locales fall back to English.

Requirements

  • Visual Studio Code 1.73.0 or later.
  • Git installed and available on PATH.

Install

After publication, search for Git Diff Review in the VS Code Extensions view.

To install a locally built VSIX, use Extensions: Install from VSIX... in VS Code, or run:

code --install-extension git-diff-review-0.1.0.vsix

Build a VSIX

Install the development dependencies and create the package:

npm ci
npm test
npm run package:vsix

Development, tests, and VSIX packaging were verified with Node.js v18.20.2.

The generated .vsix file is written to the project folder. Before publishing to the Marketplace, create a publisher account and replace the placeholder publisher value in package.json with its exact Marketplace ID. Repository and MIT license metadata are configured; verify the copyright holder in LICENSE is correct.

Features

  • Compare the active file from the Command Palette or editor title, or a file/folder from Explorer.
  • Resolve text merge conflicts from Git Diff Review: Resolve Merge Conflicts or the conflicted file's Source Control context menu.
  • Compare the current, incoming, and optional base text for each conflict block, choose a side or both, and edit the full result in the panel.
  • Save a draft to the working file without staging, or explicitly confirm Save and Stage Resolved File to run git add for that file; conflict markers must be removed first. Binary conflicts are not supported.
  • Compare a whole project by running the folder/project command from the Command Palette. It defaults to the active editor's workspace folder, or the first workspace folder if no editor is active; without an open workspace, it uses the active file's Git repository root. Explorer actions continue to use the selected folder.
  • Choose either a branch or tag as the comparison baseline; annotated tags are resolved to their target commit.
  • Resume the last review in the workspace from Git Diff Review: Resume Last Review after closing the panel or reloading VS Code.
  • Review folder/project differences in a dedicated panel with a changed-file list, previous/next navigation, and progress.
  • Filter large changed-file lists; very large diffs use plain text and long blocks can be expanded on demand to keep the panel responsive.
  • Right-click a changed file to copy its relative or absolute path, open it in an editor, or reveal it in the file manager.
  • Navigate between difference hunks inside the current file, separately from moving to another file.
  • See working and branch versions side by side, with per-block actions to apply the branch block or keep and mark the working block reviewed.
  • See explicit insertion and deletion markers when one side has no lines at the change location.
  • See basic syntax highlighting for supported file types in the review panel.
  • Keep the working-tree version or explicitly adopt the selected branch version for the current file.
  • Open the working file in a normal VS Code editor for full language and editing support.
  • Save buffer edits from the review panel, and navigate hunks with F7 / Shift+F7.
  • See clear messages when there are no text differences or the review is complete.
  • If edits introduce new differences in a processed file, that file returns to the review queue.
  • Keep the final diff open when the review completes; close it only when you choose to.
  • Binary files are skipped in folder/project reviews.

Resolve Merge Conflicts

When Git reports unresolved text conflicts, run Git Diff Review: Resolve Merge Conflicts from the Command Palette, or use the selected conflict file's Source Control context menu. This is an alternative resolution flow; it does not forcibly intercept normal editor opening. The panel lists unresolved files and shows each conflict's current (ours), incoming (theirs), and—when available—base sections. Choose current, incoming, both, or base for a block, then edit the full result directly in the panel.

Use Save Draft to write the current result to the working file without staging it. Once all conflict markers are removed, Save and Stage Resolved File asks for confirmation, saves the result, and runs git add only for that file. Other conflicted files remain untouched. Binary merge conflicts are not supported; use VS Code or another tool for those.

The branch/tag review panel compares the working tree on the left with the selected reference on the right. Unsaved changes in an already-open working file are included. Applying a branch block updates the working editor buffer; use Save working changes to persist it. Whole-file adoption saves the selected state. Branch/tag review does not check out branches or change the Git index. The separate merge-resolution flow stages only the conflict file after you explicitly confirm Save and Stage Resolved File. Resume state stores one last-review snapshot per workspace, overwritten as progress changes. It contains repository/branch identifiers, file paths, progress, and compact difference fingerprints, but no source contents; fingerprints for obsolete hunks are pruned. Diff calculation uses short-lived temporary copies in the operating system's temp directory, which are removed when the calculation finishes. Syntax highlighting is provided by Highlight.js for recognized file extensions; this lightweight rendering is not the full VS Code language service, and multiline syntax constructs may not color exactly as they do in the native editor. For responsiveness, syntax highlighting is skipped when a file's visible differences exceed 400 lines or 40,000 characters. Difference sides over 400 rendered lines are initially truncated and can be expanded.

The review panel keeps changed files and navigation visible beside the difference blocks. Difference-block actions are next to the corresponding side-by-side block; whole-file actions are separate. Keeping a working block does not change file contents; it marks that block reviewed for the current comparison. When every project file has been reviewed or processed, the extension announces completion and leaves the final review panel open. Explorer context-menu actions and the editor-title compare action are enabled by default and can be hidden independently with gitDiffReview.showExplorerContextMenu and gitDiffReview.showEditorTitleAction. Command Palette commands remain available.

License

This project is distributed under the MIT License. See LICENSE.

Debug the extension

Launch an Extension Development Host

  1. Open this extension's folder in VS Code.
  2. Run npm install once if dependencies are not installed.
  3. Open Run and Debug (Ctrl+Shift+D), select Run Git Diff Review, and press F5. The launch configuration runs npm run compile first and starts a separate Extension Development Host with this extension loaded.
  4. In the new host window, open a Git repository to use as the test project. The easiest safe setup is a disposable repository with at least two branches and a few changed files. You can also use this project if it has suitable branches and changes.
  5. In the host, run Git Diff Review: Compare Active File with Branch or Tag from the Command Palette, or right-click a file/folder in Explorer. Select the comparison reference when prompted.
  6. To debug, set breakpoints in src/extension.ts, src/hunkDiff.ts, src/reviewPanel.ts, src/mergeConflicts.ts, or src/mergeResolutionPanel.ts. The original VS Code window is the extension development environment; the launched window is the Extension Development Host. Use the original window's debugger controls to step, continue, and stop.

The extension host's Output panel and Developer: Toggle Developer Tools are useful for runtime diagnostics. TypeScript compilation errors appear in the original window's Problems panel.

Rebuild while developing

F5 compiles once before launch. After changing code, run Terminal: Run Task → npm: compile, or start the watcher in a terminal:

npm run watch

Then use Developer: Reload Window in the Extension Development Host to load the latest compiled extension. Stop the debug session when finished.

Quick validation

Run the TypeScript build from the extension folder:

npm run compile

Run focused tests for difference-block selection and replacement:

npm test

For manual behavior checks, use a disposable Git repository and verify file comparison, folder/project navigation, per-block and whole-file actions, no-difference and completion messages, and binary-file skipping. To test conflict resolution, create a merge conflict in a text file and verify current/incoming/base choices, draft saving, explicit confirmation before staging, and that only the selected conflict file is staged.

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