gh-pr-rebase

Rebase a GitHub PR branch onto the repository default branch with conflict handling.

3|2|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/beeman/skills --skill gh-pr-rebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-pr-rebase
Source: https://github.com/beeman/skills/tree/main/gh-pr-rebase
Command: npx skills add https://github.com/beeman/skills --skill gh-pr-rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps a feature branch in a GitHub PR up to date with the repository's default branch by performing a careful rebase, enabling safe history updates and timely conflict resolution.

Core Features & Use Cases

  • Safe PR rebasing: rebase the active PR branch onto origin/<default> while preserving commits and avoiding changes to the default branch.
  • Conflict management: resolve straightforward conflicts and prompt for human decisions on ambiguous ones.
  • Post-rebase push: update the remote PR branch using --force-with-lease after user approval.
  • Recovery and safety: preserve the starting HEAD to enable rollback if needed.

Quick Start

Rebase my current PR branch onto the repository's default branch and push the updated branch after resolving conflicts.

Frequently Asked Questions about gh-pr-rebase

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

FAQPage Schema
How do I rebase a GitHub pull request branch onto the default branch?

To rebase a GitHub pull request, the process identifies the default branch, fetches the remote state, and rebases your active branch onto origin/<default> while preserving the starting HEAD for rollback.

What happens when a git rebase hits merge conflicts in a pull request?

When a git rebase hits conflicts, straightforward conflicts are resolved automatically, while ambiguous cases are escalated to the user for a decision before proceeding with the branch update.

Is it safe to force push a rebased GitHub PR branch?

Force pushing a rebased GitHub PR branch is safe when using --force-with-lease, which verifies the remote state hasn't changed unexpectedly before updating the branch, provided this action is allowed by repository policy.

Can I rollback a feature branch if a pull request rebase goes wrong?

You can rollback a feature branch after a failed rebase because the starting HEAD is preserved before the operation begins, allowing you to restore the original commit history if the update causes issues.

Does rebasing a PR branch change the repository's default branch history?

Rebasing a PR branch does not change the default branch history; the process only updates your feature branch against origin/<default> and pushes the modified commits to your remote PR branch.