SuperAPI AI Directory

resolving-merge-conflicts

Coding & development

View repository

Updated 10-16 10:04

About this skill

  1. Look at the current state—what state the merge/rebase is in. Check the git history and conflicted files.

  2. Find the primary source of each conflict. Deeply understand the reason and original intent behind each change. Read commit messages, look at PRs, look at the original issue/ticket.

  3. Resolve conflict hunks one by one. Preserve both sides' intent whenever possible. If incompatible, choose the side consistent with the stated goal of the merge, and record the trade-off.Do notinvent new behavior. Always resolve, never --abort。

  4. Find the project'sautomated checksand run them—usually typecheck, then tests, then format. Fix anything the merge broke.

  5. Finish the merge/rebase. Stage and commit all changes. If it is a rebase, keep going until all commits are rebased.