resolving-merge-conflicts
Installation
SKILL.md
Resolving Merge Conflicts
Systematically resolve in-progress Git merge and rebase conflicts by identifying the semantic intent of both branches and verifying integration integrity with automated test gates.
Core Invariants
- 3-Way Intent Reconstruction: Understand the common merge-base ancestor, the incoming changes (
THEIRS), and the target branch changes (OURS) before altering conflicted code. - Never Blindly Choose Ours or Theirs: Inspect every conflict hunk individually; synthesize solutions that preserve the functional requirements of both branches.
- Zero Orphaned Conflict Markers: Verify that all
<<<<<<<,=======, and>>>>>>>markers are completely eliminated before staging. - Non-Destructive Resolution: Preserve adjacent unchanged code, comments, and docstrings; avoid accidental line deletions outside conflict hunks.
- Mandatory Post-Resolution Test Pass: Execute the full build, typecheck, and test suite before concluding the merge (
git commit) or rebase (git rebase --continue).