rebase-onto-main

Rebase a conflicting pull-request branch onto its moved base branch while preserving authored history.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/Hallmanac/hall9k --skill rebase-onto-main-hallmanac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase-onto-main
Source: https://github.com/Hallmanac/hall9k/tree/main/.claude/skills/rebase-onto-main
Command: npx skills add https://github.com/Hallmanac/hall9k --skill rebase-onto-main-hallmanac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When other pull requests merge into main after your branch was cut, your PR becomes unmergeable with conflicts that nothing surfaces automatically. This Skill guides an agent through rebasing the branch onto its moved base, resolving conflicts with judgment instead of mechanically, and verifying the result actually builds and passes tests. ## Core Features & Use Cases - Judgment-based conflict resolution: Distinguishes keep-both, pick-a-side, and genuinely disputed conflicts, and parks unresolvable disputes with a RESOLUTION: disputed marker for human decision instead of guessing. - History preservation: Replays existing commits onto the new base without squashing, lands resolutions inside the commit being replayed, and never leaves a conflict marker in a commit. - Behavioral verification: Runs the project's own build and test gates against the rebased tree, since a textually clean rebase can still be behaviorally wrong. - Use Case: A PR sits approved but unmergeable because three other PRs merged first. Dispatch this Skill to rebase the branch, resolve the shared-file conflicts, run the test suite, and leave the branch ready for the daemon's force-with-lease push. ## Quick Start Rebase this pull request branch onto origin/main, resolve each conflict by reading what both sides changed, and run the test suite before finishing.

Frequently Asked Questions about rebase-onto-main

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rebase a pull request branch that conflicts with main?

Fetch origin, inspect both sides with git log, then run git rebase origin/<base> to replay your branch's commits onto the new base. Resolve each conflict by reading what both sides changed, then run the project's build and test gates before finishing.

How should I resolve git rebase conflicts without losing work?

Keep both changes when they are independent, pick a side only when one genuinely supersedes the other, and land the resolution inside the commit being replayed via git add and git rebase --continue. If both sides changed the same behavior and neither clearly wins, abort and escalate to a human rather than guessing.

When is a rebase onto main not needed for a pull request?

A rebase is unnecessary when the branch is merely behind its base but still mergeable, since GitHub merges it fine as-is. It is only required when GitHub reports the PR as CONFLICTING against its base branch.

Why does a clean rebase still break the build or tests?

A rebase can resolve every textual conflict yet still be behaviorally wrong, because each side compiled and passed alone but their combination breaks. Running the project's own build and test suite against the rebased tree is the only way to catch this fallout.

How do I avoid committing conflict markers during a rebase?

Grep the resolved files for <<<<<<<, =======, and >>>>>>> before every git rebase --continue. Checking before the commit exists prevents marker strings from landing inside committed files, where they are much harder to catch.