---
name: mattpocock-resolving-merge-conflicts
description: "Use when you need to resolve an in-progress git merge/rebase conflict."
license: "MIT"
metadata:
  decimalai-skill-id: "c43f6f93-af09-4afc-8129-49d754e1a6f7"
  decimalai-version-id: "f27944a0-40f8-4843-a170-8c998fd3f28a"
  decimalai-version: "1"
  decimalai-body-sha256: "53a17acc2c2c4337811b4028117650c8a46f003876cf10689b08c44944ac6f86"
  decimalai-name: "mattpocock/resolving-merge-conflicts"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "coding"
  decimalai-source: "https://app.decimal.ai/s/mattpocock-resolving-merge-conflicts@1/SKILL.md"
---
1. **See the current state** of the merge/rebase. Check git history, and the conflicting files.

2. **Find the primary sources** for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.

3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort`.

4. Discover the project's **automated checks** and run them, typically typecheck, then tests, then format. Fix anything the merge broke.

5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
