agentleFS
WenWuZhiDaoWenWuZhiDao/mattpocock-skills-zh/skills/engineering/resolving-merge-conflicts/SKILL.md

resolving-merge-conflicts

Skill27 starsChanged 3 months agoMITView on GitHub

在你需要解决一个进行中的 git merge/rebase 合并冲突时使用。

Files
SKILL.md
  1. 查看 merge/rebase 的当前状态。检查 git 历史,以及有冲突的文件。
  2. 为每个冲突找到主要来源。深入理解每处变更为何做出,以及原始意图是什么。阅读 commit 消息、查看 PR、查看原始的 issue/工单。
  3. 解决每个 hunk。 在可能之处保留双方的意图。当不兼容时,选择与本次 merge 所声明目标相符的那个,并记下权衡。不要 发明新行为。始终解决冲突;永不 --abort。
  4. 发现项目的 自动化检查 并运行它们——通常是类型检查,然后测试,然后格式化。修复 merge 破坏的任何东西。
  5. 完成 merge/rebase。 暂存所有内容并提交。如果是 rebase,继续 rebase 过程,直到所有 commit 都完成 rebase。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.