rebase

Rebases the current Git branch onto a target branch and resolves conflicts.

1|Updated May 4, 2026
One-click install
npx skills add https://github.com/wesbragagt/nixos-config --skill rebase-wesbragagt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rebase
Source: https://github.com/wesbragagt/nixos-config/tree/main/home/skills/rebase
Command: npx skills add https://github.com/wesbragagt/nixos-config --skill rebase-wesbragagt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Rebasing a branch onto an updated main or another target branch involves repetitive Git commands and tricky conflict resolution. This Skill automates the fetch-and-rebase workflow and guides careful, context-aware conflict resolution so both sets of changes are preserved. ## Core Features & Use Cases - Automated Rebase Workflow: Fetches origin, detects the default branch, and rebases the current branch onto the chosen target with a single command. - Guided Conflict Resolution: Inspects recent changes to conflicting files in the target branch via git log before resolving, preserving changes from both sides. - Use Case: Your feature branch has fallen behind main. Invoke the Skill with no arguments to fetch origin and rebase onto the default branch, resolving any conflicts along the way and receiving a compact summary of what was rebased. ## Quick Start Ask the assistant to rebase the current branch onto main, optionally passing a target branch name such as develop or origin/release.

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 branch onto main?

Invoke the rebase Skill with no arguments. It detects the default branch via git remote show origin, fetches origin, and rebases your current branch onto the local default branch automatically.

How do I rebase onto a specific branch like develop?

Pass the branch name as an argument, such as develop or origin/develop. The Skill strips the origin/ prefix, fetches origin, and rebases onto the local branch rather than the remote-tracking ref.

How are rebase conflicts resolved during the process?

Before resolving, the Skill runs git log -p -n 3 on each conflicting file against the target branch to understand recent changes. It then edits files to preserve both sides, stages them, and continues with git rebase --continue.

What happens if a rebase conflict is too complex to resolve?

The Skill pauses and asks for guidance before proceeding when a conflict is unclear or too complex. It never forces a resolution that could silently drop changes from either branch.

Does the rebase Skill push changes to the remote?

No. The Skill only fetches, rebases locally, and resolves conflicts. Pushing the rebased branch, typically with force-with-lease, remains a separate manual step under your control.