Check the current merge/rebase status. Review the git history and conflicted files.
Identify the primary sources for each conflict. Gain a deep understanding of why each change was made and what the original intent was. Read commit messages, check PRs, and review original issues/tickets.
Resolve each hunk. Preserve the intent of both parties as much as possible. If they are incompatible, choose the one that aligns with the goal of this merge and document the trade-off. Do not invent new behaviors. Always resolve conflicts; do not use
--abort
.
Locate the project's automated checks and run them, typically including typechecks, tests, and formatting. Fix any issues introduced by the merge.
Complete the merge/rebase. Stage all changes and commit. If rebasing, continue the rebase process until all commits are completed.