resolve

A GitWand command workflow for resolving Git merge conflicts, which happen when competing code changes affect the same parts of a file. It automatically handles simple cases and leaves complicated sections for manual review.

In plain words
What is it for?
Use it to check conflict status, preview or apply automatic resolutions, and review remaining complex conflicts before finishing a merge.
Why use it?
It identifies which conflicts can be resolved safely and explains unresolved ones with the original, current, and incoming versions. This reduces repetitive conflict work while keeping difficult decisions visible.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/devlint/gitwand/resolve
Clone the repo
git clone --depth 1 https://github.com/devlint/GitWand

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 509 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00509
Opus 5 $0.00000 $0.00254
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

Measured yesterday against content hash 7bcf67ee1033, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

resolve scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/resolve.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Resolve Git conflicts with GitWand

Use the GitWand CLI to automatically resolve trivial merge conflicts, then handle remaining complex hunks manually.

Workflow

1. Check conflict status

npx gitwand status --json

This returns a JSON report showing each conflicted file, how many conflicts it has, and how many are auto-resolvable.

2. Auto-resolve what GitWand can handle

npx gitwand resolve --json

GitWand resolves conflicts with certain or high confidence automatically (patterns: same_change, one_side_change, delete_no_change, whitespace_only, non_overlapping, value_only_change, generated_file). Files are written in-place.

Use --dry-run to analyze without modifying files.

3. Interpret the JSON output

The resolutions array in each file entry contains:

  • line: start line of the conflict in the original file
  • type: the conflict pattern detected
  • resolved: whether GitWand auto-resolved it
  • explanation: human-readable reason for the decision
  • pendingHunks (if present): unresolved hunks with ours/theirs/base content for manual review

4. Handle remaining conflicts

For hunks with "resolved": false (type complex):

  • Read the hunk content from pendingHunks if available, or open the file
  • Understand the semantic intent of both sides using the explanation field
  • Write the correct resolution considering both changes
  • Stage the resolved file with git add

5. Verify

npx gitwand status

Confirm all conflicts are resolved, then git commit to complete the merge.

Tips

  • GitWand has specialized resolvers for JSON, YAML, Markdown, Vue SFC, CSS, TypeScript imports, and lockfiles (npm/yarn/pnpm). It resolves these at the semantic level, not just line-by-line.
  • The .gitwandrc file in the repo root can configure merge policies (prefer-ours, prefer-theirs, prefer-safety, prefer-merge, strict) and per-path overrides.
  • Confidence scoring uses a composite of typeClassification, dataRisk, and scopeImpact — not just the conflict type.

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 55 lines · 0 tokens per session scan A 7bcf67ee1033

Subscribe to this mod's changes

resolve is a command published in the GitHub repository devlint/GitWand (167 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 509 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.