查看当前 merge/rebase 状态。检查 git history 和冲突文件。
为每个冲突找到 primary sources。深入理解每个变更为什么产生,以及原始意图是什么。阅读 commit messages,检查 PRs,检查原始 issues/tickets。
解决每个 hunk。 尽可能保留双方意图。若二者不兼容,选择符合本次 merge 目标的一方,并记录 trade-off。不要发明新行为。始终解决冲突;不要
--abort。发现项目的 automated checks 并运行它们,通常是 typecheck、tests、format。修复 merge 引入的问题。
完成 merge/rebase。 Stage 所有内容并 commit。若正在 rebase,继续 rebase 流程直到所有 commits 都完成。
Resolving Merge Conflicts
适用于需要解决正在进行的 git merge/rebase 冲突时。
Resolving Merge Conflicts by vinvcn · 1cad265
npx get-skill add vinvcn/resolving-merge-conflicts 
File contents
---name: resolving-merge-conflictsdescription: 适用于需要解决正在进行的 git merge/rebase 冲突时。---1. **查看当前 merge/rebase 状态**。检查 git history 和冲突文件。2. **为每个冲突找到 primary sources**。深入理解每个变更为什么产生,以及原始意图是什么。阅读 commit messages,检查 PRs,检查原始 issues/tickets。3. **解决每个 hunk。** 尽可能保留双方意图。若二者不兼容,选择符合本次 merge 目标的一方,并记录 trade-off。**不要**发明新行为。始终解决冲突;不要 `--abort`。4. 发现项目的 **automated checks** 并运行它们,通常是 typecheck、tests、format。修复 merge 引入的问题。5. **完成 merge/rebase。** Stage 所有内容并 commit。若正在 rebase,继续 rebase 流程直到所有 commits 都完成。
vinvcn/mattpocock-skills-zh-cn commit 1cad2657e5
Frequently asked questions
Run npx get-skill add vinvcn/resolving-merge-conflicts in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
适用于需要解决正在进行的 git merge/rebase 冲突时。 It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
vinvcn (@vinvcn) published this skill. Their other Agent Skills are listed on their SkillMD profile.