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:
- Understand both sides before editing: what each change intended.
- Open each conflicted file; read the full surrounding context.
- Combine intents; do not blindly pick one side.
- Remove all conflict markers and reconcile the logic.
- Build and run tests before completing the merge.
- 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