rebase

Rebase a Git branch onto a base branch with conflict resolution and safe pushing.

1|Updated Oct 9, 2018
One-click install
npx skills add https://github.com/Apostolos-Delis/Dotfiles --skill rebase-apostolos-delis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase
Source: https://github.com/Apostolos-Delis/Dotfiles/tree/main/.agents/skills/rebase
Command: npx skills add https://github.com/Apostolos-Delis/Dotfiles --skill rebase-apostolos-delis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you integrate changes from the main branch into your current feature branch by rebasing, resolving any conflicts that arise, and pushing the updated branch safely.

Core Features & Use Cases

  • Conflict Resolution: Guides you through resolving merge conflicts during a rebase.
  • Safe Pushing: Uses --force-with-lease to prevent accidental overwrites of others' work.
  • Pre-flight Checks: Ensures you're in a Git repository, not on the main branch, and have a clean working tree before starting.
  • Use Case: You've been working on a feature for a while, and main has moved ahead. Use this Skill to bring your branch up-to-date with main without creating a merge commit, keeping your history linear.

Quick Start

Use the rebase skill to rebase the current branch onto origin/main and resolve any conflicts.

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 main without losing uncommitted changes?

To rebase your Git branch onto main safely, this Skill performs pre-flight checks to ensure you have a clean working tree and are not on the main branch before applying commits sequentially to maintain a linear history.

What is the safest way to force push a Git branch after rebasing?

The safest way to force push after rebasing is using the `--force-with-lease` command, which this Skill automates to prevent accidental overwrites of remote commits while updating your branch.

How do I resolve merge conflicts automatically during a Git rebase?

During a Git rebase, this Skill detects merge conflicts and guides you through the resolution process step-by-step, ensuring your feature branch integrates cleanly with the updated base branch.

When should I use Git rebase instead of merging to update my feature branch?

You should use Git rebase instead of merging when you want to integrate changes from the main branch into your feature branch without creating a merge commit, keeping your project history clean and linear.

Does this Git rebase workflow require any specific dependencies or scripts?

No external dependencies are required. This Skill operates using built-in scripts and references to validate your repository status, manage branch context, and execute the rebase sequence.

Why is my Git rebase failing when I try to update from the master branch?

Your Git rebase may be failing if pre-flight checks detect you are on the main branch or have a dirty working tree, which this Skill validates before execution to prevent repository corruption.