-
Check the current merge/rebase status. Inspect the git history and the conflicted files.
-
Find primary sources for each conflict. Deeply understand why each change was made and what the original intent was. Read commit messages, check PRs, check the original issues/tickets.
-
Resolve each hunk. Preserve both sides' intent as much as possible. If the two are incompatible, choose the side that matches the goal of this merge, and record the trade-off.Do notinvent new behavior. Always resolve the conflict; do not
--abort。 -
Discover the project's automated checks and run them, usually typecheck, tests, format. Fix any problems introduced by the merge.
-
Complete the merge/rebase. Stage everything and commit. If a rebase is in progress, continue the rebase flow until all commits are complete.
resolving-merge-conflicts
Coding & development
Updated 10-16 09:45