PluginBench
Skill
Review
Audit score 70

resolving-merge-conflicts

vinvcn/mattpocock-skills-zh-cn

Resolve git merge/rebase conflicts by understanding intent and preserving both sides when compatible.

What is resolving-merge-conflicts?

Guidance for resolving in-progress git merge and rebase conflicts. Use this when you encounter conflicting changes and need to integrate them thoughtfully while maintaining project integrity.

  • Examine merge/rebase state and identify conflicting files
  • Trace original intent by reading commit messages, PRs, and issues
  • Resolve each conflict hunk while preserving compatible changes from both sides
  • Run automated checks (typecheck, tests, format) to catch merge-introduced issues
  • Complete the merge/rebase by staging and committing all changes

How to install resolving-merge-conflicts

npx skills add https://github.com/vinvcn/mattpocock-skills-zh-cn --skill resolving-merge-conflicts
Claude Code
Cursor
Windsurf
Cline

How to use resolving-merge-conflicts

  1. 1.Check the current merge/rebase status and review git history
  2. 2.For each conflicting file, identify the primary sources of change by reading commit messages, PRs, and related issues
  3. 3.Resolve each conflict hunk by preserving both sides' intent when compatible; if incompatible, choose the approach aligned with the merge goal and document the trade-off
  4. 4.Run the project's automated checks (typecheck, tests, format) and fix any issues introduced by the merge
  5. 5.Stage all resolved files and complete the merge with a commit, or continue the rebase process until all commits are processed

Use cases

Good for
  • Integrating feature branches with conflicting changes to the same files
  • Rebasing a branch onto an updated main branch with overlapping edits
  • Merging pull requests that modify the same code sections
  • Resolving conflicts during team collaboration on shared codebases
  • Completing a rebase workflow after fixing individual commit conflicts
Who it's for
  • Software developers managing git workflows
  • Team leads integrating multiple feature branches
  • Engineers resolving conflicts during code reviews
  • Anyone performing git merge or rebase operations

resolving-merge-conflicts FAQ

Should I abort the merge if conflicts are too complex?

No. Always resolve conflicts rather than aborting. Take time to understand the original intent behind each change by examining commit messages, PRs, and issues.

What if both sides of a conflict seem equally valid?

Choose the approach that aligns with the current merge goal and document the trade-off in your commit message or comments.

Do I need to invent new behavior to resolve conflicts?

No. Never invent new behavior. Only combine or choose from the existing changes on both sides.

What automated checks should I run after resolving?

Run your project's standard checks: typecheck, tests, and format. These catch issues introduced during the merge process.

Full instructions (SKILL.md)

Source of truth, from vinvcn/mattpocock-skills-zh-cn.


name: resolving-merge-conflicts description: "适用于需要解决正在进行的 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 都完成。