git-resolve-conflicts
Resolve Git merge, rebase, cherry-pick, or PR branch conflicts against a fetched remote base branch. Use when a user asks to fix conflicts, update a branch onto its remote base, make a branch mergeabl
SKILL.mdplugins/grimoire/skills/git-resolve-conflicts/SKILL.md
GitHubGit Resolve Conflicts
Use this as a safety protocol for risky Git conflict resolution. Do not use it as a general guide to interpreting code conflicts.
Required Protocol
Collect Git state with the bundled read-only script. Treat it as the deterministic source for conflict-state collection.
<python> <skill-dir>/scripts/git_conflict_preflight.py --repo .Stop if unrelated dirty worktree files, staged changes, or untracked files make conflict resolution ambiguous. Ask before stashing, committing, discarding, or moving them.
Confirm the remote base by fetching and resolving the fetched ref:
git fetch --prune <remote> git rev-parse --verify <remote>/<base> <python> <skill-dir>/scripts/git_conflict_preflight.py --repo . --base-ref <remote>/<base>Before starting a new merge or rebase attempt, create a backup ref:
git branch backup/conflict-resolution/<branch-name> HEADIf a Git operation is already in progress, continue that operation. Otherwise use the user-requested operation; when unspecified, prefer rebasing onto the fetched remote base:
git rebase <remote>/<base>When conflicts occur, rerun preflight before editing. Use standard Git inspection commands only as needed for path-level detail.
Before asking about or resolving any non-mechanical conflict, read
references/interview-gate.md.Treat semantic, product, API, data, security, ownership, and deletion-retention conflicts as mandatory stop conditions. Interview the user before resolving them.
After each resolution batch, stage resolved files and continue the active operation:
git add <paths> git rebase --continue git merge --continue git cherry-pick --continueAfter completion, verify with preflight, Git checks, and identifiable project checks:
<python> <skill-dir>/scripts/git_conflict_preflight.py --repo . --base-ref <remote>/<base>
git status --short --branch
git diff --check
Run relevant tests, typecheck, lint, or build commands when the project makes them discoverable.
- Report the base ref and SHA, conflict files resolved, user interview decisions, verification commands, and remaining risk.
Push Rule
Do not push automatically. If the user explicitly asks to update a remote branch after conflict resolution, use git push --force-with-lease, never plain --force.
Rebase Terminology
During a rebase conflict, ours means the already-rebased side and theirs means the topic commit being replayed. Explain this mapping before using --ours, --theirs, or those labels with the user.