auto-rebase

Rebase feature branches onto a target branch and force-push with lease.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/baphled/dotopencode --skill auto-rebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-rebase
Source: https://github.com/baphled/dotopencode/tree/main/skills/auto-rebase
Command: npx skills add https://github.com/baphled/dotopencode --skill auto-rebase

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of rebasing feature branches onto their target branch, resolving conflicts, and force-pushing to keep Pull Requests current, ensuring a clean and linear Git history.

Core Features & Use Cases

  • Automated Rebasing: Rebase feature branches onto a specified target branch (e.g., next).
  • Conflict Resolution Guidance: Provides steps for manual conflict resolution if needed.
  • Safe Force-Pushing: Uses git push --force-with-lease to prevent accidental overwrites.
  • Worktree Aware: Handles rebasing correctly in multi-worktree setups.
  • Use Case: When your feature branch is falling behind the main development branch and you need to update it before merging, this skill will automatically fetch the latest changes, rebase your branch, and prepare it for a safe force-push.

Quick Start

Use the auto-rebase skill to rebase the current branch onto origin/next and then force-push with lease.

Frequently Asked Questions about auto-rebase

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

FAQPage Schema
How do I automatically rebase a feature branch and keep my pull request up to date?

To resolve Git conflicts during an automated rebase, this Skill detects branch divergence and provides explicit steps for manual conflict resolution before attempting to complete the rebase and force-push.

Why use force-with-lease when force-pushing a rebased Git branch?

Using force-with-lease when force-pushing a rebased Git branch prevents accidental overwrites by verifying the remote branch state, ensuring you do not overwrite changes pushed by others while maintaining linear history.

Can I rebase feature branches correctly when using Git worktrees?

Yes, you can rebase feature branches correctly in multi-worktree setups. This Skill is worktree aware, handling the rebasing process without breaking your repository state.

What is the best way to prepare a divergent feature branch for merging?

The best way to prepare a divergent feature branch for merging is to rebase it onto the target branch, ensuring a clean, linear Git history before integration.

Does this automated rebase process use Git merge operations?

No, this automated rebase process does not use Git merge operations. It ensures linear history by exclusively using rebase operations to apply commits onto the target branch.