rebase

Rebase the current Git branch onto origin/main, preferring upstream changes.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/a2f0/tearleads --skill rebase-a2f0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase
Source: https://github.com/a2f0/tearleads/tree/main/.codex/skills/rebase
Command: npx skills add https://github.com/a2f0/tearleads --skill rebase-a2f0

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you update your current feature branch with the latest changes from the main branch, resolving conflicts efficiently.

Core Features & Use Cases

  • Update Branch: Integrates the latest main branch commits into your current branch.
  • Conflict Resolution: Automatically prefers upstream changes when conflicts arise, simplifying the merge process.
  • Use Case: Before starting new work on a feature branch, you can use this Skill to ensure your branch is up-to-date with the main codebase, preventing larger merge conflicts later.

Quick Start

Rebase the current branch onto the latest main branch, preferring upstream changes.

Frequently Asked Questions about rebase

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

FAQPage Schema
How do I rebase my current Git branch onto the latest main branch?

To rebase your current Git branch, this Skill fetches the latest origin/main commits and replays your branch changes on top, automatically resolving conflicts by prioritizing upstream code updates.

What is the best way to update a feature branch with main and resolve Git conflicts?

Updating a feature branch is best handled by rebasing onto origin/main with a conflict resolution strategy that automatically prefers upstream changes, ensuring your branch stays current with minimal manual intervention.

Does rebasing with upstream changes overwrite my local branch commits?

Rebasing with upstream changes replays your local commits on top of the latest origin/main, prioritizing upstream code during conflicts, and then force-pushes the updated branch to the remote repository.

Why does rebasing a feature branch onto main prevent larger merge conflicts later?

Rebasing a feature branch onto main prevents larger conflicts by continuously integrating the latest upstream commits into your working branch early, resolving smaller divergences automatically before they compound.

Can I automate fetching, rebasing, and force-pushing a Git branch?

You can automate fetching, rebasing, and force-pushing by using this Skill to pull origin/main updates, apply your branch commits with upstream conflict prioritization, and push the result to GitHub remotely.

When should I not use an automated rebase that prefers upstream changes?

You should not use an automated rebase that prefers upstream changes when your local branch contains critical modifications that must override the origin/main codebase, as this process will discard conflicting local edits.