Resolving Merge Conflicts

by mattpocockc55ee46073edNo licenseListed Oct 8, 2026Updated Oct 8, 2026

Use when you need to resolve an in-progress git merge/rebase conflict.

Instructions onlySoftware Development
AI-generated overview

Guides an agent through resolving an in-progress git merge or rebase conflict step by step.

What it does
This skill provides a five-step procedure for resolving an in-progress git merge or rebase conflict. It covers inspecting the current state and conflicting files, tracing each conflict back to its original intent via commit messages, pull requests and tickets, resolving each hunk while preserving both intents where possible, running the project's automated checks, and finishing the merge or rebase by staging and committing. It is instructions only and produces a completed, committed merge or rebase rather than any file artifact.
When to use it
Use it when a git merge or rebase is already in progress and has left conflicting files that need to be resolved. It suits situations where the agent must decide how to reconcile competing changes and then verify the result with the project's own checks.
Requirements
Requires a git repository with an in-progress merge or rebase and access to git history, commit messages, pull requests and issue tickets. Running the project's automated checks requires whatever tooling the project uses, such as a typechecker, test suite and formatter. It ships no scripts; it is instructions only.
  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.

Source and attribution

Source:mattpocock/skillsinskills/engineering/resolving-merge-conflictsat commitc55ee46

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal