resolving-merge-conflicts

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

Updated Feb 22, 2024
One-click install
npx skills add https://github.com/tlipoca9/dotfiles --skill resolving-merge-conflicts-tlipoca9
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: resolving-merge-conflicts
Source: https://github.com/tlipoca9/dotfiles/tree/main/home/dot_agents/skills/resolving-merge-conflicts
Command: npx skills add https://github.com/tlipoca9/dotfiles --skill resolving-merge-conflicts-tlipoca9

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merge and rebase conflicts interrupt git workflows and are often resolved hastily, losing the intent of one side's changes or introducing broken code. This Skill provides a disciplined process for understanding each conflict's origin and resolving it correctly. ## Core Features & Use Cases - Intent Analysis: Traces each conflicting change back to its commit messages, PRs, and original issues to understand why it was made. - Hunk-by-Hunk Resolution: Preserves both intents where possible, picks the side matching the merge's stated goal when incompatible, and never aborts the merge. - Verification and Completion: Runs the project's automated checks (typecheck, tests, format) and finishes the merge or continues the rebase to completion. - Use Case: During a long-running feature branch rebase onto main, conflicts appear in five files. Use this Skill to investigate each conflict's origin, resolve every hunk without inventing new behavior, run the test suite, and complete the rebase. ## Quick Start Resolve the current in-progress git merge conflict in my repository and finish the merge after running the project checks.

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

Resolving a git merge conflict starts with inspecting the current merge state and conflicting files, then understanding why each side changed the code. Resolve each hunk to preserve both intents where possible, run the project's checks, stage everything, and commit.

How to resolve conflicts during a git rebase?▼

During a git rebase, resolve each conflicted hunk by tracing the original commits and their intent, then stage the files and continue the rebase. Repeat the process for every commit until the rebase completes, and never abort midway.

Should I use git merge or git rebase for conflicting branches?▼

Both merge and rebase can produce conflicts, and the resolution process is similar: understand each change's intent and resolve hunks accordingly. The choice depends on your team's history preferences, not on conflict avoidance.

When should I abort a merge instead of resolving conflicts?▼

This workflow never aborts; it always resolves conflicts to completion. Aborting discards progress and is appropriate only when the merge itself was started by mistake, not because conflicts are difficult.

Why do merge conflicts keep breaking tests after resolution?▼

Conflicts resolved without understanding both changes' intent often combine incompatible logic. After resolving, always run the project's typecheck, tests, and formatter to catch anything the merge broke before committing.