解决合并冲突
- 作者仓库星标 0
- 作者更新于 2026年8月24日 14:19
- 作者仓库 skills
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @mattpocock · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
1. **See the current state** of the merge/rebase. Check git history, and the conflicting files.
2. **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.
3. **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`.
4. Discover the project's **automated checks** and run them, typically typecheck, then tests, then format. Fix anything the merge broke.
5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
章节与文件索引
按说明文件中的顺序排列。
查看当前状态
寻找主要来源
解决每个大块头。
完成合并/变基。
文件/命令 -> --abort · merge/rebase. · issues/tickets.
内容校验值 -> bfe63225833a
当前原文的自动摘译,尚未人工审校。
查看当前状态
合并/变基。检查 git 历史记录和冲突文件。
寻找主要来源
对于每个冲突。深刻理解每次改变的原因以及初衷是什么。阅读提交消息,检查 PR,检查原始问题/票据。
解决每个大块头。
尽可能保留这两种意图。如果不兼容,请选择与合并既定目标相匹配的选项并记下权衡。不要发明新的行为。始终下定决心;从不
--abort。发现项目的自动检查并运行它们,通常是类型检查,然后测试,然后格式化。修复合并损坏的所有内容。
完成合并/变基。
暂存一切并提交。如果进行变基,请继续变基过程,直到所有提交都变基。