kramme:rebase-pr

Rebase the current branch onto the latest base branch and force-push with --force-with-lease.

2|2|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/Abildtoft/kramme-cc-workflow --skill kramme-rebase-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kramme:rebase-pr
Source: https://github.com/Abildtoft/kramme-cc-workflow/tree/main/skills/kramme%3Arebase-pr
Command: npx skills add https://github.com/Abildtoft/kramme-cc-workflow --skill kramme-rebase-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates rebasing the current branch onto the latest base branch and force-pushing to keep PRs up-to-date and conflict-free.

Core Features & Use Cases

  • Detects the base branch, fetches updates, and rebases the current branch with --autostash to preserve local changes.
  • Automatically resolves conflicts across up to 10 rounds, recording what changed and providing a summary.
  • Provides a safe final step to force-push with --force-with-lease after user confirmation to minimize risk.
  • Use Case: when your PR lags behind main and needs to be rebased against the latest commits before merging.

Quick Start

Run the kramme:rebase-pr skill to rebase the current branch onto the latest main/master and push with force-with-lease.

Frequently Asked Questions about kramme:rebase-pr

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

FAQPage Schema
How do I safely rebase a Git branch and force-push to update a PR?

To safely rebase a Git branch and force-push, fetch the latest base branch, apply commits with --autostash, resolve conflicts automatically, and push using --force-with-lease to prevent overwriting remote changes.

What is the safest way to force-push a rebased Git branch to origin?

The safest way to force-push a rebased Git branch is using --force-with-lease, which verifies the remote branch hasn't received new commits before overwriting, preventing accidental loss of collaborators' work.

How to handle Git rebase conflicts automatically when updating a pull request?

Handle Git rebase conflicts automatically by running rebase rounds that attempt to resolve merge issues, recording the changes made, and providing a summary of the resolved conflicts before pushing.

How do I rebase a PR branch without losing uncommitted local changes?

Rebase a PR branch without losing uncommitted local changes by using the --autostash flag, which temporarily stashes your work, applies the rebase, and reapplies your changes automatically.

Can I automatically detect the base branch when rebasing a pull request?

Yes, you can automatically detect the base branch by checking the repository configuration against origin/main or origin/master, fetching updates, and rebasing the current branch onto the detected base.