resolving-merge-conflicts

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

1|Updated Mar 2, 2025
One-click install
npx skills add https://github.com/marjorg/setup --skill resolving-merge-conflicts-marjorg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resolving-merge-conflicts
Source: https://github.com/marjorg/setup/tree/main/home/.agents/skills/archive/0-matt/resolving-merge-conflicts
Command: npx skills add https://github.com/marjorg/setup --skill resolving-merge-conflicts-marjorg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merge and rebase conflicts interrupt development and are often resolved hastily, losing the intent behind one side of the change. This Skill provides a disciplined workflow for understanding each conflict's origin, resolving hunks correctly, and finishing the merge safely. ## 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 conflicting hunk by preserving both intents where possible, documenting trade-offs when they are incompatible, and never inventing new behavior or aborting the merge. - Verification and Completion: Runs the project's automated checks (typecheck, tests, format), 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 onto main and hit conflicts in three files. Use this Skill to trace each conflict back to its originating PR, resolve the hunks correctly, run the test suite, and finish the rebase. ## Quick Start Resolve the current in-progress git merge conflict in this repository, preserving the intent of both sides, 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 preserve both intents where possible. Check commit messages, PRs, and original issues before editing, and never resolve by blindly picking one side.

How to finish a git rebase after resolving conflicts?

After resolving all conflicting hunks, stage the resolved files and continue the rebase until all commits are 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?

Both produce conflicts when branches diverge; the resolution process is the same. Rebase rewrites your commits onto the target branch for a linear history, while merge creates a merge commit, so choose based on your team's history policy.

What should I check before resolving a merge conflict?

Inspect the current merge state, git history, and the conflicting files, then trace each change to its commit message, pull request, or original ticket. Understanding the original intent prevents resolutions that silently discard needed behavior.

When should I abort a merge instead of resolving it?

This workflow never aborts: always resolve the conflict rather than running git merge --abort or rebase --abort. If the two intents are incompatible, pick the one matching the merge's stated goal and note the trade-off.