resolving-merge-conflicts

by Matt Pocock · mattpocock/skills

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

Shipping & operationsMIT3 files

What it tells an agent to do.

The author’s own instructions, as your agent receives them — the same bytes the endpoint serves.

  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.

More in shipping & operations

using-git-worktrees

Jesse Vincent

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via n

What it does →

finishing-a-development-branch

Jesse Vincent

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

What it does →

ci-cd-and-automation

Addy Osmani

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test run

What it does →

deprecation-and-migration

Addy Osmani

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when decid

What it does →

git-workflow-and-versioning

Addy Osmani

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work acros

What it does →

observability-and-instrumentation

Addy Osmani

Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that r

What it does →