rebase-origin-main

Rebase the current Git branch onto origin/main and resolve conflicts iteratively.

259|24|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/ReviewStage/stage-cli --skill rebase-origin-main
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase-origin-main
Source: https://github.com/ReviewStage/stage-cli/tree/main/.agents/skills/rebase-origin-main
Command: npx skills add https://github.com/ReviewStage/stage-cli --skill rebase-origin-main

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rebasing a feature branch onto origin/main can introduce conflicts and uncertainty. This Skill provides a guided, repeatable workflow to rebase onto origin/main and resolve conflicts one by one until a clean history is achieved.

Core Features & Use Cases

  • Fetches latest origin/main and rebases the current branch onto it
  • Detects conflicts and guides deterministic resolution to preserve the intended changes
  • Warns about common pitfalls in rebases (e.g., inverted ours/theirs labels) and ensures correctness across commits
  • Use Case: When your feature branch has diverged from main and you want to integrate the latest changes without losing work

Quick Start

Initiate the workflow to rebase your current branch onto origin/main and resolve conflicts progressively until the rebase completes.

Frequently Asked Questions about rebase-origin-main

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

FAQPage Schema
How do I rebase my current Git branch onto origin/main and resolve conflicts?

To rebase a Git branch onto origin/main, the workflow fetches the latest origin/main and iteratively guides conflict resolution one by one. This preserves your commit intent while integrating origin/main changes until a clean history is achieved.

Why does Git rebase invert ours and theirs labels when rebasing onto origin/main?

During a Git rebase onto origin/main, ours refers to the upstream commits and theirs refers to your branch, which inverts normal merge semantics. The workflow warns about this pitfall to ensure correct conflict resolution across commits.

What is the best way to automate a Git rebase workflow with multiple conflicts?

Automating a Git rebase workflow requires an interactive conflict-resolution flow that detects conflicts and guides deterministic resolution iteratively. This approach applies to local repositories with a tracked origin/main to preserve intended changes.

Do I need a local repository with a tracked origin/main to use this rebase workflow?

Yes, this rebase workflow requires a local repository with a tracked origin/main. It depends on Git fetch and rebase capabilities, applying to local repositories where rebases may produce conflicts requiring guided resolution.

How does guided conflict resolution preserve commit intent during a Git rebase?

Guided conflict resolution preserves commit intent by detecting conflicts during the Git rebase and walking through deterministic resolution one by one. This ensures your intended changes are maintained while correctly integrating origin/main updates.

When should I avoid rebasing my feature branch onto origin/main?

You should avoid rebasing onto origin/main if your local repository lacks a tracked origin/main or if the branch has shared commits, as the interactive conflict-resolution flow is designed for local branch management to preserve commit intent.