git-advanced-1-interactive-rebase
Sub-skill of git-advanced: 1. Interactive Rebase (+1).
Best use case
git-advanced-1-interactive-rebase is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of git-advanced: 1. Interactive Rebase (+1).
Teams using git-advanced-1-interactive-rebase should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/1-interactive-rebase/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How git-advanced-1-interactive-rebase Compares
| Feature / Agent | git-advanced-1-interactive-rebase | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of git-advanced: 1. Interactive Rebase (+1).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 1. Interactive Rebase (+1)
## 1. Interactive Rebase
**Basic Interactive Rebase:**
```bash
# Rebase last 5 commits
git rebase -i HEAD~5
# Rebase onto main
git rebase -i main
# Rebase from specific commit
git rebase -i abc123^
```
**Interactive Rebase Commands:**
```
pick abc123 First commit # Use commit as-is
reword def456 Second commit # Edit commit message
edit ghi789 Third commit # Stop to amend
squash jkl012 Fourth commit # Combine with previous
fixup mno345 Fifth commit # Combine, discard message
drop pqr678 Sixth commit # Remove commit
```
**Common Rebase Workflows:**
```bash
# Squash all commits into one
git rebase -i main
# Change all but first 'pick' to 'squash'
# Reorder commits
git rebase -i HEAD~3
# Rearrange the pick lines
# Split a commit
git rebase -i HEAD~3
# Change 'pick' to 'edit' on target commit
git reset HEAD^
git add -p # Add pieces
git commit -m "First part"
git add .
git commit -m "Second part"
git rebase --continue
# Edit commit message
git rebase -i HEAD~3
# Change 'pick' to 'reword'
```
**Autosquash Pattern:**
```bash
# Create fixup commit
git commit --fixup=abc123
# Create squash commit
git commit --squash=abc123
# Apply autosquash
git rebase -i --autosquash main
# Enable autosquash by default
git config --global rebase.autosquash true
```
## 2. Git Worktrees
**Basic Worktree Usage:**
```bash
# List worktrees
git worktree list
# Add worktree for existing branch
git worktree add ../feature-branch feature/new-feature
# Add worktree with new branch
git worktree add -b hotfix/urgent ../hotfix-urgent main
# Remove worktree
git worktree remove ../feature-branch
# Prune stale worktrees
git worktree prune
```
**Worktree Workflow:**
```bash
# Project structure
workspace/
├── main/ # Main development
├── feature-auth/ # Feature branch
├── hotfix-critical/# Hotfix branch
└── experiment/ # Experimental work
# Setup
cd main
git worktree add ../feature-auth feature/authentication
git worktree add ../hotfix-critical -b hotfix/critical-bug
git worktree add ../experiment -b experiment/new-approach
# Work on feature
cd ../feature-auth
# make changes...
git commit -am "Add authentication"
# Quick switch to fix bug
cd ../hotfix-critical
# fix bug...
git commit -am "Fix critical bug"
git push
# Back to feature
cd ../feature-auth
```
**Worktree Helper Script:**
```bash
#!/bin/bash
# scripts/worktree.sh
# ABOUTME: Git worktree management helper
# ABOUTME: Simplifies creating and managing worktrees
set -e
WORKTREE_BASE="${WORKTREE_BASE:-$(dirname $(git rev-parse --git-dir))}"
case "$1" in
add)
BRANCH="$2"
DIR="${3:-$WORKTREE_BASE/../$(echo $BRANCH | tr '/' '-')}"
if git show-ref --verify --quiet "refs/heads/$BRANCH"; then
git worktree add "$DIR" "$BRANCH"
else
git worktree add -b "$BRANCH" "$DIR"
fi
echo "Created worktree at: $DIR"
;;
remove)
git worktree remove "$2"
;;
list)
git worktree list
;;
*)
echo "Usage: $0 {add|remove|list} [branch] [directory]"
exit 1
;;
esac
```Related Skills
interactive-report-generator
Generate interactive HTML reports with Plotly visualizations from data analysis results. Supports dashboards, charts, and professional styling.
interactive-Codex-to-file-based-fallback
Switch from tmux/interactive Codex to file-based Codex -p execution when interactive runs fail with upstream errors or analysis-only stalls, then verify landing from git/GitHub state.
interactive-issue-execution-worktree-guardrails
Execute approved GitHub issues in isolated worktrees with interactive Codex/Codex runs, while containing agent drift and salvaging progress when provider/runtime problems occur.
interactive-dashboard-builder
Create self-contained HTML/JavaScript dashboards with Chart.js, filters, and professional styling
web-artifacts-builder-1-interactive-dashboard
Sub-skill of web-artifacts-builder: 1. Interactive Dashboard (+1).
skill-creator-advanced-usage
Sub-skill of skill-creator: Advanced Usage.
interactive-menu-builder-5-confirmation-dialogs
Sub-skill of interactive-menu-builder: 5. Confirmation Dialogs (+1).
interactive-menu-builder-3-table-display
Sub-skill of interactive-menu-builder: 3. Table Display (+1).
interactive-menu-builder-2-multi-level-menu-system
Sub-skill of interactive-menu-builder: 2. Multi-Level Menu System.
interactive-menu-builder-1-consistent-navigation
Sub-skill of interactive-menu-builder: 1. Consistent Navigation (+3).
interactive-menu-builder-1-basic-menu-structure
Sub-skill of interactive-menu-builder: 1. Basic Menu Structure.
git-advanced-9-monorepo-patterns
Sub-skill of git-advanced: 9. Monorepo Patterns.