rebase

Rebase the current Git branch onto the upstream default branch and force-push with lease.

23|4|Updated Sep 5, 2013
One-click install
npx skills add https://github.com/drn/dots --skill rebase-drn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase
Source: https://github.com/drn/dots/tree/main/agents/skills/rebase
Command: npx skills add https://github.com/drn/dots --skill rebase-drn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of rebasing your current branch onto the latest upstream default branch and force-pushing to update your Pull Request, streamlining your Git workflow and conflict resolution.

Core Features & Use Cases

  • Automated Rebasing: Fetches the latest changes from the default branch (main/master) and rebases your current branch onto it.
  • Conflict Resolution: Guides you through resolving merge conflicts if they arise during the rebase process.
  • Force-Pushing PRs: Updates your open Pull Request with the rebased changes using git push --force-with-lease.
  • Use Case: When working on a feature branch, you can use this skill to easily incorporate the latest changes from main into your branch and update your Draft PR without manual Git commands.

Quick Start

Rebase the current branch onto the latest upstream default branch and force-push to update the PR.

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 upstream default branch?

To rebase your current Git branch, this Skill fetches the latest upstream changes, determines the default branch, and rebases your feature branch onto it to incorporate the newest commits.

What is the safest way to force-push a rebased Pull Request to GitHub?

The safest way to force-push a rebased Pull Request is using git push --force-with-lease, which this Skill executes to update your open PR while preventing accidental overwrites of remote changes.

How do I resolve merge conflicts during an interactive Git rebase?

During an interactive Git rebase, this Skill guides you through resolving merge conflicts by detecting conflicts, allowing you to fix them, and continuing the rebase process once resolved.

Do I need the GitHub CLI to rebase and update my Pull Request?

Yes, you need the GitHub CLI installed, as this Skill validates your current branch state and checks for open Pull Requests using GitHub CLI tools before executing the rebase and force-push.

Why does my rebase fail when my local branch is not up to date with the remote?

Your rebase may fail if the local branch state is invalid or out of sync, which is why this Skill validates the current branch state and fetches upstream changes before attempting the rebase operation.

What is the difference between a standard merge and rebasing a feature branch?

Rebasing a feature branch replays your commits onto the latest default branch to maintain a linear history, whereas a standard merge creates a merge commit, and this Skill automates the rebase and force-push workflow.