Git Rebase

Rebase the current Git branch onto a target branch with conflict resolution guidance.

1|1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/dtsong/claude-code-windows-setup --skill git-rebase-dtsong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Git Rebase
Source: https://github.com/dtsong/claude-code-windows-setup/tree/main/skills/git-workflows/skills/rebase
Command: npx skills add https://github.com/dtsong/claude-code-windows-setup --skill git-rebase-dtsong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you integrate changes from the main branch into your current feature branch, ensuring a clean and linear commit history before creating a pull request.

Core Features & Use Cases

  • Linear History: Keeps your commit history clean and easy to follow by reapplying your commits on top of the latest main branch.
  • Conflict Resolution Guidance: Provides clear steps and tips for handling merge conflicts that may arise during the rebase process.
  • Use Case: Before submitting a pull request for your new feature, you can use this skill to rebase your branch onto the latest main to ensure your changes are based on the most recent code and to resolve any potential conflicts proactively.

Quick Start

Use the git rebase skill to rebase your current branch onto the main branch.

Frequently Asked Questions about Git Rebase

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

FAQPage Schema
How do I rebase my current Git branch onto the main branch?

To rebase your current Git branch onto main, the skill fetches the latest changes from the target branch and reapplies your commits onto its tip. It guides you through resolving any merge conflicts to ensure a linear commit history.

Why rebase a feature branch before submitting a pull request?

Rebasing a feature branch before a pull request ensures your changes integrate the latest main branch code. It reapplies your commits onto the current tip, proactively resolving potential conflicts and keeping your commit history linear.

How does this handle merge conflicts during the rebase process?

During the rebase process, it identifies potential merge conflicts and provides clear steps for conflict resolution. It guides you through completing the rebase or aborting the operation if issues arise.

What is the difference between rebasing and merging for version control?

Rebasing reapplying commits onto the target branch tip ensures a linear commit history, while merging creates a merge commit to preserve the exact chronological history. Rebasing keeps the version control history clean and easy to follow.

Can I use this to rebase onto a branch other than main?

Yes, you can rebase onto branches other than main. The skill rebases the current Git branch onto a specified target branch, typically main or develop, reapplying your commits onto that branch's tip.

What should I do if the Git rebase gets stuck or fails?

If a Git rebase gets stuck due to conflicts, the skill provides clear steps and tips for handling merge conflicts. It also supports guiding you through the completion or complete abortion of the rebase operation.