resolving-merge-conflicts

Resolves in-progress git merge and rebase conflicts while preserving both change intents.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/sanjanb/my-agent-harness --skill resolving-merge-conflicts-sanjanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resolving-merge-conflicts
Source: https://github.com/sanjanb/my-agent-harness/tree/main/skills/mp-resolving-merge-conflicts
Command: npx skills add https://github.com/sanjanb/my-agent-harness --skill resolving-merge-conflicts-sanjanb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merge and rebase conflicts interrupt development and are often resolved hastily, losing one side's intent or introducing broken code. This Skill provides a disciplined workflow for understanding each conflict's origin, resolving hunks correctly, and verifying the result with the project's automated checks. ## Core Features & Use Cases - Conflict Investigation: Inspects the current merge/rebase state, git history, commit messages, PRs, and original issues to understand why each change was made. - Intent-Preserving Resolution: Resolves each hunk by preserving both intents where possible, choosing the side matching the merge's stated goal when they are incompatible, and never aborting the merge. - Verification and Completion: Runs the project's automated checks (typecheck, tests, format), fixes regressions, then stages, commits, and continues the rebase until finished. - Use Case: You run git rebase main on a long-lived feature branch and hit conflicts across several files. The Skill traces each conflicting change back to its PR, resolves the hunks without inventing new behavior, runs the test suite, and completes the rebase. ## Quick Start Resolve the current in-progress git merge conflict in this repository, preserving both sides' intent, then run the project's checks and finish the merge.

Frequently Asked Questions about resolving-merge-conflicts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve a git merge conflict without losing changes?

Resolve each conflicting hunk by first understanding why both changes were made, then preserving both intents where possible. When the changes are incompatible, pick the side matching the merge's stated goal and note the trade-off rather than inventing new behavior.

How to finish a git rebase after resolving conflicts?

After resolving all conflicting hunks, stage the resolved files and continue the rebase until every commit is rebased. Run the project's automated checks such as typecheck and tests before completing to catch anything the merge broke.

Should I ever use git merge --abort when resolving conflicts?

This workflow never aborts; it always resolves the conflict and completes the merge or rebase. Aborting discards progress, so instead investigate each conflict's origin through commit messages, PRs, and issues to resolve it correctly.

What checks should I run after resolving merge conflicts?

Discover the project's existing automated checks and run them in order: typically typecheck first, then tests, then formatting. Fix anything the merge broke before staging and committing the resolution.

When should I not use an automated merge conflict resolution approach?

Avoid resolving conflicts mechanically without understanding intent, such as blindly accepting one side. Conflicts involving semantic changes require reading commit messages, PRs, and original tickets to avoid silently dropping behavior.