resolving-merge-conflicts

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merge and rebase conflicts stall development and are often resolved hastily, losing one side's intent or breaking the build. 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 - State Inspection: Examines the current merge/rebase state, git history, and conflicting files before touching anything. - Intent-Driven Resolution: Traces each conflict to its source commits, PRs, and issues so resolutions preserve both intents where possible and never invent new behavior. - Verification and Completion: Runs the project's typecheck, tests, and formatting, 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 across several files. Use this Skill to understand why each side changed, resolve every hunk deliberately, run the test suite, and finish the rebase cleanly. ## Quick Start Resolve the current git merge conflict in my repository, run the project 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 step by step?▼

First inspect the merge state and conflicting files, then trace each conflict to its source commits and PRs to understand intent. Resolve each hunk preserving both intents where possible, run the project's checks, then stage and commit.

How to resolve conflicts during a git rebase?▼

During a rebase, resolve each conflicting hunk based on the original commit intent, stage the resolved files, and continue the rebase until all commits are replayed. Always resolve rather than aborting the rebase.

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

Both create conflicts when the same lines change on each side. This Skill handles either case: it inspects the current state first, then resolves hunks and finishes whichever operation is in progress.

What should I do after resolving merge conflicts?▼

Run the project's automated checks, typically typecheck, then tests, then formatting, and fix anything the merge broke. Then stage everything, commit, and continue the rebase if one was in progress.

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

This Skill's policy is to always resolve and never abort. When two changes are incompatible, pick the one matching the merge's stated goal, note the trade-off, and avoid inventing new behavior.