Merge Conflict Resolution

Use when: resolve git merge or rebase conflicts correctly without losing intended changes.

kimtth Updated

File contents

Goal: a merged result that keeps both sides' intent and still works.

Use for:

  • resolving conflicts during merge, rebase, or cherry-pick
  • understanding which changes to keep and why
  • recovering from a confusing conflicted state

Workflow:

  1. Understand both sides before editing: what each change intended.
  2. Open each conflicted file; read the full surrounding context.
  3. Combine intents; do not blindly pick one side.
  4. Remove all conflict markers and reconcile the logic.
  5. Build and run tests before completing the merge.
  6. Review the final diff against both parents.

Tactics:

  • use a three-way merge tool for complex conflicts
  • resolve in small logical chunks
  • re-run the feature's tests, not just compile
  • when lost, abort and restart with a clearer plan

Rules:

  • never keep conflict markers in committed code
  • do not discard a side without understanding it
  • verify behavior after resolving, not just syntax
  • prefer git merge --abort over guessing when unsure

kimtth/agent-skill-100-lines-or-less/tree/main/skills/merge-conflict-resolution commit ebf3e7defb

Frequently asked questions

npx skillmds@latest add kimtth/merge-conflict-resolution