← ClaudeAtlas

resolve-merge-conflictslisted

Resolve git merge/rebase conflicts non-destructively — preserving the intent of BOTH sides — and hand off to a human when a conflict can't be resolved safely. Use when a branch or PR has conflicts with its base ('this branch has conflicts that must be resolved', GitHub mergeable=CONFLICTING / mergeStateStatus=DIRTY), when a rebase / merge / cherry-pick / stash / revert stops with conflict markers (<<<<<<< ======= >>>>>>>), when a PR is behind base and needs updating, when syncing a long-lived branch or back-merging a hotfix, or when deciding rebase vs merge. Covers the safe-resolution rules (no blind -X ours/theirs, hunk-by-hunk with diff3, abort/reflog escape hatches, verify-after), the rebase ours/theirs inversion, lockfile/rename/semantic conflicts, and the escalate-when-stuck criteria.
stealth-engine/skills · ★ 2 · Code & Development · score 76
Install: claude install-skill stealth-engine/skills
# Resolve merge conflicts (non-destructively) Resolve git conflicts so that **both sides' intent survives**, verify the result, and **stop and ask a human** the moment a safe resolution isn't obvious. The git mechanics are the easy part; the danger is *silently dropping someone's work* — a blind "take theirs," a clean-looking textual merge that's logically broken, or a force-push over a teammate's commits. Command recipes live in [`reference/playbook.md`](./reference/playbook.md) (load on demand). This body is the decision rules. ## First: rebase or merge? You update a feature/PR branch against its base one of two ways. Either is fine — pick by context, not dogma: | | `git rebase origin/main` | `git merge origin/main` | | --- | --- | --- | | History | linear (replays your commits) | adds a merge commit | | Conflicts | may re-hit the **same** conflict per replayed commit (turn on `rerere`) | resolve **once** | | Push after | `--force-with-lease` (rewrites your branch) | normal push | | Best for | your **own** unshared PR branch | a branch **others** also commit to | In a **squash-merge** repo (see [`git-trunk-branch-and-pr-automation`](../git-trunk-branch-and-pr-automation/SKILL.md)) the feature branch's history is flattened at merge anyway, so a merge commit on the branch is harmless — when a rebase keeps re-conflicting, **merge instead** and resolve once. **Never rebase a branch other people are actively committing to.** ## The non-negotiable safety rules 1. **Never