resolving-merge-conflicts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese-
See the current state of the merge/rebase. Check git history, and the conflicting files.
-
Find the primary sources for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.
-
Resolve each hunk. Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do not invent new behaviour. Always resolve; never.
--abort -
Discover the project's automated checks and run them — typically typecheck, then tests, then format. Fix anything the merge broke.
-
Finish the merge/rebase. Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
-
查看合并/变基的当前状态。检查git历史记录,以及冲突文件。
-
找到每个冲突的主要来源。深入理解每个更改的原因,以及原始意图。阅读提交信息,查看PRs,检查原始问题/工单。
-
解决每个代码块的冲突。尽可能保留双方的意图。当意图不相容时,选择符合合并既定目标的方案,并记录权衡取舍。不要创造新的行为。务必解决冲突;绝不要使用。
--abort -
了解项目的自动化检查并运行它们——通常是typecheck,然后是测试,再是代码格式化。修复合并导致的任何问题。
-
完成合并/变基。暂存所有内容并提交。如果是变基操作,继续变基过程直到所有提交都完成变基。