Code
Resolve a merge conflict
Reconcile two branches by intent, not by picking a side.
Fill it in
What you are merging in.
Context beats guessing.
Your prompt
Resolve the conflicts merging [your branch to merge]. What each side was doing: [your what each side was doing] Reconcile by INTENT. A conflict is two people changing the same lines for different reasons, so the answer is almost never to take one side: it is the change that does both things. Picking a side is how one of them silently disappears. For each conflict, read the history of both sides far enough back to see what each was for. Then write the merged version and say in one line what you preserved from each. When two changes genuinely cannot coexist, stop and say so rather than choosing. That is a decision for whoever wrote them. Run the tests after. A merge that compiles is not a merge that works: the classic failure is two correct changes that are wrong together.
Use Resolve a merge conflictOpens with everything above already filled in.
Why this works
A conflict is two people changing the same lines for different reasons, so the correct resolution is almost never one side. Picking a side is how somebody's change silently disappears, and it is the default behaviour of anything resolving conflicts mechanically. So this reads far enough back on both branches to see what each change was for, then writes the version that does both, and stops rather than choosing when they genuinely cannot coexist.
Questions
- What if the two changes really do contradict?
- It stops and says so. That is a decision for the people who wrote them, not one to make quietly inside a merge.