| English | 中文 |
The key to resolving conflicts is to first understand the intent of both sides, then decide which side to keep or how to merge.
Do not mechanically choose ours or theirs just because you see conflict markers.
<<<<<<< HEAD
Current branch content
=======
Merged branch content
>>>>>>> feature/login
You need to organize this content into the final desired state and delete the conflict markers.
Check status:
git status
git diff
After resolving files:
git add <resolved-files>
git merge --continue
If things go wrong:
git merge --abort
Check status:
git status
git diff
After resolving files:
git add <resolved-files>
git rebase --continue
If things go wrong:
git rebase --abort
Check conflict sources:
git log --oneline --left-right --merge
AI is prone to just doing text splicing when handling conflicts.
Have AI explain the semantics of both sides, then let a human confirm the final result.