resolving-merge-conflicts

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

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

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, resolving every hunk correctly, and finishing the merge safely. ## Core Features & Use Cases - Context Investigation: Inspects git history, commit messages, PRs, and original issues to understand why each conflicting change was made. - Intent-Preserving Resolution: Resolves each hunk by preserving both intents where possible, and documents trade-offs when they are incompatible. - Verification and Completion: Runs the project's automated checks (typecheck, tests, format), fixes merge breakage, 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 five files. Use this Skill to trace each conflict back to its originating PR, resolve the hunks without dropping either feature, 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 branches, then 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 without losing changes?▼

Resolve each conflicting hunk by first understanding why both changes were made, then preserving both intents where possible. Check commit messages, PRs, and original issues before editing, and never invent new behavior during resolution.

How to finish an interrupted git rebase with conflicts?▼

Resolve each conflicted file, stage the results, and continue the rebase until all commits are replayed. After resolving, run the project's typecheck, tests, and formatter to confirm the merge did not break anything.

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

Both can produce conflicts, and the resolution process is the same: investigate intent, resolve hunks, verify with automated checks, and complete the operation. The choice depends on your team's history preferences, not on conflict avoidance.

Why is git merge --abort discouraged during conflict resolution?▼

Aborting discards progress and leaves the underlying divergence unresolved, so the conflict returns on the next attempt. Always resolve conflicts forward by understanding both sides and committing a resolution instead.

What should I check after resolving merge conflicts?▼

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