rebase-latest-default

Rebase the current Git branch onto the latest default branch.

3|1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/epologee/leclause-skills --skill rebase-latest-default
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase-latest-default
Source: https://github.com/epologee/leclause-skills/tree/main/packages/rebase-latest-default/skills/rebase-latest-default
Command: npx skills add https://github.com/epologee/leclause-skills --skill rebase-latest-default

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rebase the current Git branch on the latest default branch (local or remote), selecting the most up-to-date target to keep your work aligned and minimize conflicts.

Core Features & Use Cases

  • Detects the default branch name from local and remote refs and chooses an appropriate rebase target across worktrees and repos with or without a remote.
  • Performs pre-rebase checks (no uncommitted changes, not already on the default, etc.) and reports the outcome clearly.
  • Handles straightforward rebases automatically and guides you through conflict resolution when needed, with status reporting after the rebase.

Quick Start

Use the /rebase-latest-default command to rebase your current branch onto the latest default branch.

Frequently Asked Questions about rebase-latest-default

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

To rebase your current Git branch onto the latest default branch, the tool detects the most up-to-date local or remote target, performs pre-rebase checks, and handles straightforward merge conflicts automatically to align your worktree.

Does Git rebase work with worktrees when local and remote default branches diverge?

Yes, Git rebase works with worktrees by selecting the most up-to-date target across local and remote refs, even when main or master diverge, ensuring your repository branch management stays aligned without forcing a manual choice.

What happens if there are merge conflicts during a Git rebase onto the default branch?

During a Git rebase onto the default branch, straightforward merge conflicts are handled automatically, while complex conflict resolution is guided through clear post-rebase status reporting to direct your next actions.

Can I rebase a Git branch in a repository with no remote configured?

Yes, you can rebase a Git branch in a repository with no remote configured, as the workflow detects the default branch name from local refs and applies the rebase target accordingly.

What are the pre-rebase checks required to safely rebase a Git worktree?

To safely rebase a Git worktree, pre-rebase checks verify there are no uncommitted changes and confirm you are not already on the default branch, ensuring a clean state before selecting the latest target.