resolving-merge-conflicts

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

Updated Nov 10, 2013
One-click install
npx skills add https://github.com/bnferguson/dotfiles --skill resolving-merge-conflicts-bnferguson
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: resolving-merge-conflicts
Source: https://github.com/bnferguson/dotfiles/tree/main/.agents/skills/resolving-merge-conflicts
Command: npx skills add https://github.com/bnferguson/dotfiles --skill resolving-merge-conflicts-bnferguson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merge and rebase conflicts interrupt development and are often resolved hastily, losing the intent of one side's changes 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 typecheck, tests, and formatter, fixes anything the merge broke, then stages, commits, and continues the rebase to completion. - Use Case: You are mid-rebase of a long-lived feature branch and hit conflicts in five files. The Skill traces each conflicting change back to its PR, resolves the hunks without dropping either feature's behavior, runs the test suite, and finishes the rebase. ## Quick Start Resolve the current in-progress git merge conflict, verify the project checks pass, and complete 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 preserve 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 hunks, stage the resolved files and continue the rebase until every commit is replayed. Run the project's typecheck, tests, and formatter first to confirm the resolution did not break anything.

Should I use git merge or git rebase when conflicts happen?▼

The resolution workflow is the same for both: inspect the conflict state, research each change's origin, resolve hunks, and verify with automated checks. The Skill handles whichever operation is already in progress rather than choosing between them.

Why is aborting a merge conflict a bad idea?▼

Aborting discards progress and leaves the conflict unresolved for later, often making it harder as branches diverge further. The correct approach is to always resolve forward: understand each change, resolve every hunk, and complete the merge or rebase.

What should I check after resolving merge conflicts?▼

Run the project's automated checks in order: typecheck first, then tests, then the formatter. Fix anything the merge broke before staging and committing the resolution.