Skill

Resolve Git Merge and Rebase Conflicts

A 5-step process for resolving in-progress git merge or rebase conflicts by understanding each change's original intent, never aborting.

Works with git

84
Spark score
out of 100
Updated 21 days ago
Version 1.0.1

Add to Favorites

Why it matters

Systematically resolve git merge and rebase conflicts by understanding the intent behind conflicting changes, preserving both goals where possible, and ensuring all automated checks pass before completing the merge.

Outcomes

What it gets done

01

Analyze merge conflict state and identify all conflicting files in git history

02

Investigate commit messages, PRs, and tickets to understand the intent behind each conflicting change

03

Resolve each conflict hunk while preserving both intents or choosing based on merge goals

04

Run project checks (typecheck, tests, format) and fix any issues before completing the merge

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-resolving-merge-conflicts | bash

Overview

Resolving Merge Conflicts

This skill resolves an in-progress git merge or rebase conflict through a 5-step process: survey the state, trace each conflicting change's original intent from commits and PRs, resolve each hunk preserving intent, run the project's checks, and finish the merge or rebase. Use it whenever there's an active git merge or rebase conflict that needs resolving.

What it does

A 5-step process for resolving an in-progress git merge or rebase conflict. Step 1 surveys the current state - checking git history and the conflicting files directly. Step 2 finds the primary source for each conflict, understanding deeply why each change was made and what the original intent was by reading commit messages, checking PRs, and checking the original issues or tickets behind each side. Step 3 resolves each conflicting hunk, preserving both intents where possible; where they're genuinely incompatible, it picks whichever matches the merge's stated goal and explicitly notes the trade-off - it never invents new behavior to paper over a conflict, and it always resolves rather than running --abort. Step 4 discovers and runs the project's own automated checks - typically typecheck, then tests, then format - fixing anything the merge broke before finishing. Step 5 finishes the merge or rebase: staging everything and committing, or if rebasing, continuing the rebase process until every commit has been rebased through.

When to use - and when NOT to

Use it when there's an in-progress git merge or rebase conflict that needs resolving.

Inputs and outputs

Input is a repository mid-merge or mid-rebase with conflicting files. Output is a completed merge or rebase - every hunk resolved based on each side's actual intent, the project's own checks passing, and the result committed (or the rebase carried through to completion).

Integrations

Uses standard git commands (history inspection, conflict resolution, staging, commit, rebase continuation) plus whatever automated checks the project defines (typecheck, test, format commands).

Who it's for

Developers stuck in an active merge or rebase conflict who want each hunk resolved based on the original intent behind both sides rather than a mechanical pick, with the project's own checks verified before finishing.

Source README

When to Use

Use when you need to resolve an in-progress git merge/rebase conflict.

  1. See the current state of the merge/rebase. Check git history, and the conflicting files.

  2. Find the primary sources for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.

  3. Resolve each hunk. Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do not invent new behaviour. Always resolve; never --abort.

  4. Discover the project's automated checks and run them - typically typecheck, then tests, then format. Fix anything the merge broke.

  5. Finish the merge/rebase. Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.