resolving-merge-conflicts

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

2|2|Updated Dec 23, 2017
One-click install
npx skills add https://github.com/xriu/dotfiles --skill resolving-merge-conflicts-xriu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: resolving-merge-conflicts
Source: https://github.com/xriu/dotfiles/tree/main/home/.skills/mattpocock/resolving-merge-conflicts
Command: npx skills add https://github.com/xriu/dotfiles --skill resolving-merge-conflicts-xriu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Resolving git merge and rebase conflicts is error-prone: developers often pick one side blindly, lose the intent behind conflicting changes, or abort the merge entirely. This Skill provides a disciplined workflow for understanding each conflict, resolving every hunk 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 tickets to understand why each change was made. - Intent-Preserving Resolution: Resolves each conflicting hunk by preserving both intents where possible, choosing the side matching the merge's stated goal when they are incompatible, and never inventing new behavior or aborting. - Verification and Completion: Runs the project's automated checks (typecheck, tests, formatting), fixes anything the merge broke, then stages, commits, and continues the rebase until complete. - Use Case: You are mid-rebase of a long-lived feature branch onto main and hit conflicts in five files. Use this Skill to trace each conflict back to its originating PR, resolve the hunks without losing either change, run the test suite, and finish the rebase. ## Quick Start Resolve the current in-progress git merge conflict in my repository, preserving the intent of both changes and running the project's checks before committing.

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 fixing conflicts?▼

After resolving all conflicting hunks, stage the resolved files and continue the rebase process until all commits are 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 explicitly forbids aborting: always resolve the conflict rather than running --abort. The reasoning is that conflicts should be understood and resolved by tracing each change back to its commit messages, PRs, and original tickets.

How do I understand why a conflicting change was made?▼

Find the primary sources for each conflict by reading the commit messages, checking the associated pull requests, and reviewing the original issues or tickets. This reveals the original intent so you can preserve it during resolution.

What checks should I run after resolving merge conflicts?▼

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