resolving-merge-conflicts
此技能提供了一套系统化的方法来高效解决 Git 合并或变基(rebase)过程中出现的冲突。它指导开发者逐步检查历史、识别冲突根源、精确处理每个冲突块,并确保自动化检查通过,从而显著减少手动解决冲突的耗时和错误,保障代码库的整洁与项目的顺利推进。
npx skills add https://github.com/mattpocock/skills --skill resolving-merge-conflictsBefore / After 效果对比
1 组用户在没有明确指导的情况下,手动解决 Git 合并冲突时,往往耗时冗长,容易遗漏关键修改或引入新的错误,导致代码库不稳定,甚至需要多次返工,严重影响开发效率和团队协作。
该 Skill 提供清晰的步骤和最佳实践,帮助开发者快速定位并准确解决冲突。此技能确保每次冲突解决都遵循规范,减少了返工和错误,显著提升了代码合并的成功率和开发流程的顺畅度。
-
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.
用户评价 (0)
发表评价
暂无评价
统计数据
用户评分
为此 Skill 评分