Merge Magic ✨
Removes the mechanical merge work so review focuses on the decisions that actually need a human. Auto-mode with verification, rollback, and multi-backend support (Copilot, Claude, GPT, Gemini, Ollama). Never auto-commits. Free extension, bring your own AI.
Try Merge Magic in 30 seconds:
- Install Merge Magic → (one click in VS Code)
- Run the live demo → (opens a temp repo with 15 conflicts that dissolve live)
💡 The demo link works when clicked from a browser on the marketplace page. If you're reading this from inside VS Code's extension viewer, that webview blocks vscode:// links — instead, open the command palette (Cmd+Shift+P / Ctrl+Shift+P) and run "Merge Magic: Run Live Demo". Same result.
Your real code is never touched. The demo runs in a throwaway temp directory.
Built in my free time. No telemetry. No ads. No paywalls. If Merge Magic saved you from a painful merge today, a coffee genuinely fuels the next feature.


Stop reading <<<<<<< markers. Click the button. Move on.
✨ Features
One-click conflict resolution
A ✨ Resolve with Merge Magic button appears above every <<<<<<< marker. Click it. The conflict disappears — both edits intelligently combined.

Resolve every conflict in a file at once
When a file has multiple conflicts, a ✨ Resolve all N conflicts in this file button appears at the top. One click cleans up the whole file.
Smart decision UX (not text markers)
When two branches actually disagreed — say, both renamed the same symbol to different names — Merge Magic doesn't silently pick. It opens a side panel with a clean one-tap question, not a wall of <<<<<<< markers.
Status bar feedback
A small ◇ Merge Magic indicator in the status bar shows real-time progress: ready → resolving → ✓ dissolved.

Merge Magic uses whatever LLM you've already authenticated — GitHub Copilot (via VS Code's vscode.lm API), Claude Code CLI, Ollama (local), or your own Anthropic / OpenAI / Gemini API key. We don't ship an API key. We don't charge a subscription. We don't run servers. Your code never leaves your machine except via the LLM you've already authorized.
If your company already approves your LLM, Merge Magic is approved by extension.
Safety floor (the part that earns the install)
- Auto-mode never auto-commits. Resolutions land on disk. You always run
git commit yourself after reviewing the diff. Merge Magic cannot silently push bad code.
- Every auto-resolve is verified against build diagnostics. Baseline error set (ours-side, markers stripped) is captured first; merged result is re-checked after. Anything that introduces NEW errors reverts that file back to markers with the actual error surfaced. Pre-existing errors don't cause false reverts.
- Decision card, not silent pick. When two branches genuinely disagree — different renames, deletion vs modification, different default values — Merge Magic opens a one-tap side panel asking which intent. It does not pretend to know what you meant.
- Per-file undo + atomic batch undo.
Merge Magic: Undo Auto-Resolve from the command palette reverts a single file back to markers. Cmd+Z reverts the whole batch atomically (auto-mode applies as a single WorkspaceEdit).
- LLM error → markers preserved. If the model returns an unparseable response or times out, the file is left untouched. Never silently corrupted.
- Dry-run mode (
mergeMagic.dryRun: true) previews every change without writing.
🚀 How it works
1. You hit a merge conflict (after `git merge`, `git rebase`, etc.)
2. Auto-mode (off by default): the watcher fires the moment conflicts appear and resolves all files in parallel.
Manual mode: open a file with <<<<<<< markers and click ✨ "Resolve with Merge Magic".
3. Merge Magic dispatches to your configured backend (Copilot, Claude CLI, Ollama, or API key).
4. The LLM returns either:
• A clean merge (both edits combined) → applied + verified against baseline diagnostics
• A genuine decision question → one-tap pick in a side panel
5. If verification finds NEW errors, that file reverts to markers and surfaces the error.
6. Your file is clean. Keep working.
Typical resolution time: 5–8 seconds per conflict. Faster than you can read the diff yourself.
📦 Requirements
- One LLM backend — pick any:
- GitHub Copilot (zero setup if you already have it — uses VS Code's
vscode.lm API).
- Claude Code CLI on your
PATH (claude --version to verify).
- Ollama running locally (free, offline, fully private).
- API key for Anthropic / OpenAI / Gemini via environment variable.
- VS Code 1.91+ (also works in Cursor, Windsurf, and other VS Code forks).
🔧 Install
From Marketplace
Search "Merge Magic" in the Extensions panel and click Install.
Sideload from .vsix
code --install-extension merge-magic-0.7.3.vsix
⚙️ Configuration
Search "Merge Magic" in VS Code Settings.
| Setting |
Default |
What it does |
mergeMagic.backend |
"auto" |
Which LLM backend to use. auto picks the first available (vscode-lm → claude-cli → ollama → api-key). |
mergeMagic.autoResolveOnConflict |
false |
Auto mode. When true, resolves conflicts the moment git merge produces them — no clicking. Always verified, never auto-commits. |
mergeMagic.preferredVendor |
"" |
When using vscode-lm, prefer a specific vendor (e.g. copilot, anthropic). |
mergeMagic.claudePath |
"claude" |
Path to the Claude Code CLI if it's not on PATH. |
mergeMagic.ollamaModel |
"llama3.1:latest" |
Ollama model to use. Must be pulled locally. |
mergeMagic.ollamaBaseUrl |
"http://localhost:11434" |
Ollama server base URL. |
mergeMagic.timeoutSeconds |
60 |
Max seconds to wait per conflict before giving up. |
mergeMagic.dryRun |
false |
Log what would change without modifying files. Safety mode. |
🆚 How it compares
|
Built-in git markers |
Other AI tools |
Merge Magic |
| Resolves "fake" conflicts (independent edits) |
❌ |
⚠️ |
✅ |
| Surfaces real conflicts as a clean question |
❌ |
⚠️ |
✅ |
| Costs you money per merge |
Free |
$$$ |
Free (BYO LLM — Ollama is fully free) |
| Sends your code to a 3rd-party server |
No |
Usually yes |
Only via your existing LLM (Ollama keeps it local) |
| Verifies the resolution against build errors |
❌ |
❌ |
✅ (baseline-diff revert) |
| Resolves N files in parallel |
❌ |
⚠️ |
✅ |
| Works in your existing git workflow |
✅ |
⚠️ |
✅ |
| Requires API key setup |
— |
Yes |
No |
🙋 FAQ
Does Merge Magic send my code to any server?
No. Merge Magic dispatches to the LLM backend you've configured (Copilot, Claude CLI, Ollama, or your own API key) — whatever data those send, they send. We have no servers, no telemetry, no analytics.
What if I don't have any LLM installed?
Use Ollama — it's free, runs locally, no signup. brew install ollama && ollama pull llama3.1, then set mergeMagic.backend to ollama and you're done. Or use Copilot if your editor already has it.
Will this resolve every conflict?
No tool can — sometimes two humans genuinely disagree, and that needs a human decision. But Merge Magic dissolves the textual conflicts that aren't real disagreements, and reduces the real ones to a one-tap question instead of a 40-line marker dump.
What about conflicts where one branch deletes code and another modifies it?
Merge Magic doesn't pretend to know intent in those cases. It detects the disagreement and opens a one-tap decision card — "Branch A deleted this; Branch B modified it. Which intent?" The mechanical "combine both" conflicts get auto-resolved; the genuine intent decisions surface for you. Auto-mode never auto-commits, so you always review the diff before it lands.
Doesn't GitHub Copilot already have AI conflict resolution?
Yes — the smart-actions resolver ships with Copilot (experimental). It's reactive: you open the merge editor and invoke it per conflict. Merge Magic adds the workflow layer — auto-mode fires the instant git merge produces conflicts, resolves all files in parallel, verifies against build diagnostics, and reverts anything that introduces new errors. It's also backend-agnostic — works with Copilot OR Claude OR Ollama OR your own API key through one UI. If you're a low-volume Copilot user, the experimental merge editor is genuinely fine — install Merge Magic when auto-mode, verification, or multi-backend matters for your workflow.
Couldn't I just write a Claude Code skill for this?
A skill can resolve a single conflict end-to-end in the CLI, yes. Merge Magic adds: VS Code integration (CodeLens above conflicts, status bar, decision-card webview), git-state hook (no manual invocation), parallel batch across files with atomic WorkspaceEdit apply, verification floor, decision UX for ambiguous cases. Different surface area — if a CLI flow works for you, a skill is a perfectly reasonable alternative.
What if the LLM gets it wrong?
Merge Magic verifies every auto-resolve against a baseline error diagnostic set — any merge that introduces NEW build errors is reverted to markers with the actual error surfaced. If the LLM returns an unparseable response, the file is also left untouched. For extra paranoia, enable mergeMagic.dryRun to preview without writing.
Why bring your own LLM instead of bundling one?
Three reasons:
- No new subscription cost. Reuses whatever AI you already pay for (or Ollama for free local).
- Privacy is solved. Whatever data policy you trust your LLM with applies here, automatically.
- No vendor lock. Switch LLM providers and Merge Magic still works.
Does it work in Cursor / Windsurf / other VS Code forks?
Yes — every VS Code fork loads the extension API the same way.
🗺️ Roadmap
Next:
- AST-aware mechanical pre-pass — handle the ~60% of conflicts that are purely additive without an LLM call at all (free + instant).
- Inline diff syntax highlighting in decision cards.
- Accuracy benchmark vs Copilot's built-in resolver on a real-world conflict corpus.
v1.0:
- Conflict statistics dashboard — "you dissolved 47 conflicts this week, saved ~3 hours."
- Git merge driver mode — work silently without UI for users who want it invisible.
- JetBrains plugin — same magic, IntelliJ / WebStorm / PyCharm.
⭐ Liked it?
If Merge Magic dissolved a conflict for you today, please leave a 5-star review on the VS Code Marketplace — that's how more devs discover it.
Rate Merge Magic on the Marketplace →
Every star helps another developer skip a painful merge.
📜 License
MIT — see LICENSE.