Git Simple Compare
Compare git branches and files with simple, editable diffs — right inside VS Code.
Marketplace ID: newdlops.git-simple-compare
Install
- VS Code Marketplace: Git Simple Compare
- Command line:
code --install-extension newdlops.git-simple-compare
- Manual VSIX: download or build a
.vsix, then run code --install-extension git-simple-compare-0.1.0.vsix
Features
- Compare branches — pick two local/remote branches, browse the changed files in a tree (or flat list), and open each file's diff.
- Compare a file with a branch — right-click a file in the Explorer to diff it against a specific branch version.
- Compare the active file with a branch — diff the currently open file against a branch version from the editor title bar or context menu.
- Edit while comparing — in file-vs-branch diffs the working-tree side stays editable. You can also apply the whole left (branch) version to the right (working) file in one click.
- Git Graph — a visual commit graph across all branches. Click a commit to see its details (author, message, changed files), and click a file to open that commit's diff.
- Conflict resolution — during a merge/rebase/cherry-pick/revert, the Conflicts view lists unmerged files with one-click actions (open merge editor, accept ours/theirs, mark resolved) and Continue/Abort.
- Interactive rebase — edit a rebase plan in a drag-and-drop webview (reorder + pick/reword/squash/fixup/drop). Launch it from the graph ("Rebase from here") or the command palette.
- Split changes into commits — pick individual diff hunks and commit them separately, repeating for the rest (a GUI for
git add -p).
- AI messages — generate commit messages and staged PR titles/bodies by sending prompts to the local Claude Code or Codex CLI.
Usage
- Command Palette (
Cmd/Ctrl+Shift+P) → Git Simple Compare: Compare Branches
- Explorer → right-click a file →
Compare This File with Branch
- Editor → right-click (or tab right-click) →
Compare Active File with Branch
- Editor title bar → comparison icon
- Activity Bar → Git Simple Compare icon to see the changed-files view
- Command Palette →
Git Simple Compare: Show Git Graph (or the graph icon in the Changes view toolbar)
Git Graph
Opens a webview showing the commit history graph across branches. Click a commit node to view its details on the right; click any changed file to open that commit's diff. The graph loads commits lazily as you scroll until it reaches the first commit.
Interactive rebase
From the Git Graph, select a commit and click Rebase from here (or run Git Simple Compare: Start Interactive Rebase…). Arrange the plan by dragging rows and choosing an action per commit — pick / reword / squash / fixup / drop. Requires a clean working tree and confirms before rewriting history. If conflicts occur, the rebase pauses and the Conflicts view takes over; resolve and Continue.
Conflict resolution
During a merge/rebase/cherry-pick/revert, the Conflicts view appears with the unmerged files. Per file: open the 3-way merge editor, Accept Ours (--ours), Accept Theirs (--theirs), or Mark as Resolved. Use Continue / Abort in the view toolbar. Note: during a rebase, --ours/--theirs are relative to the rebase (ours = the base being replayed onto), which is git's standard behavior.
Split changes into commits
Run Git Simple Compare: Split Changes into Commits. Select the diff hunks for the first commit, type a message, and commit; the remaining changes stay in your working tree so you can commit them separately. Requires no pre-staged changes (so each commit contains exactly what you select). New (untracked) files are not shown — git add them first.
AI commit and PR messages
The Changes view includes an AI button next to the commit message box. It sends the staged diff to the selected AI CLI, so stage the files or hunks you want summarized first. The staged PR preview also has an AI button that fills the PR title and body.
This feature runs local CLIs non-interactively: claude -p for Claude Code and codex exec for Codex. Use Git Simple Compare: Configure AI CLI or the gear button beside the AI commit button to choose the provider, login/status flow, executable path, model/profile options, reasoning effort, default response language, and extra prompt instructions. Model and reasoning pickers load metadata from the installed provider CLI.
If a browser callback login cannot reach localhost, use a non-callback login method in AI CLI Settings: for Claude Code choose setup-token, console, or sso; for Codex choose device, api-key, or access-token. Then run Login / Status again.
The commit-message AI button is enabled only when there are staged changes. In PR preview, the copy button copies the generated/current PR title and body to the clipboard for use on GitHub.
The Changes view
- Toggle between tree and list layout from the view toolbar.
- Change the sort order (name / path / status) from the view toolbar.
- Click any file to open its diff.
Apply Left → Right
While a file-vs-branch diff is focused, the editor title bar shows an Apply Left to Right (→) button. It replaces the whole working file with the branch version. The change is applied as an editor edit, so you can review, undo, or tweak it before saving.
Language
The UI defaults to English. When VS Code's display language is set to Korean (ko), all commands and messages switch to Korean automatically. Use "Configure Display Language" from the Command Palette to change it.
Settings
| Setting |
Default |
Description |
gitSimpleCompare.diffBase |
twoDot |
Branch diff base (twoDot = direct, threeDot = common ancestor) |
gitSimpleCompare.includeRemoteBranches |
true |
Include remote branches in the branch picker |
gitSimpleCompare.aiCliProvider |
auto |
AI CLI provider (auto, claude, or codex) |
gitSimpleCompare.aiClaudeCommand |
claude |
Claude Code executable name or absolute path |
gitSimpleCompare.aiClaudeModel |
empty |
Claude Code model selected from CLI metadata |
gitSimpleCompare.aiClaudeEffort |
empty |
Claude Code reasoning effort (low, medium, high, xhigh, or max) |
gitSimpleCompare.aiClaudeSystemPrompt |
empty |
Optional Claude Code system prompt appended with --append-system-prompt |
gitSimpleCompare.aiClaudeLoginMode |
claudeai |
Claude login method (claudeai, console, sso, or setup-token) |
gitSimpleCompare.aiCodexCommand |
codex |
Codex executable name or absolute path |
gitSimpleCompare.aiCodexModel |
empty |
Codex model selected from the CLI model catalog |
gitSimpleCompare.aiCodexReasoningEffort |
empty |
Codex reasoning effort (low, medium, high, xhigh, or max when supported) |
gitSimpleCompare.aiCodexProfile |
empty |
Optional Codex config profile passed with --profile |
gitSimpleCompare.aiCodexLoginMode |
device |
Codex login method (device, browser, api-key, or access-token) |
gitSimpleCompare.aiResponseLanguage |
English |
Language for AI-generated messages |
gitSimpleCompare.aiCommonInstructions |
empty |
Extra prompt instructions applied to both commit and PR generation |
gitSimpleCompare.aiCommitInstructions |
empty |
Extra prompt instructions applied only to commit generation |
gitSimpleCompare.aiPullRequestInstructions |
empty |
Extra prompt instructions applied only to PR generation |
gitSimpleCompare.aiCliTimeoutMs |
120000 |
Timeout for AI CLI requests |
Development
npm install
npm run compile # bundle
npm run watch # incremental build
npm run check-types # type check
Press F5 in VS Code to launch the Extension Development Host.
Coding agents
Codex reads AGENTS.md from the repository root. Claude Code reads CLAUDE.md; this repository keeps CLAUDE.md as a small import of AGENTS.md so both agents follow the same project rules. Put personal Claude Code notes in CLAUDE.local.md; it is ignored by git.
Publishing
Release packaging uses publisher newdlops. See docs/publishing.md for the Marketplace checklist.
License
MIT