Safely rebase with automatic backup and conflict handling
Executes safe git rebases with automatic backup, conflict handling, and verification.
/plugin marketplace add cowwoc/claude-code-dog/plugin install dog@claude-code-dogThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Purpose: Safely rebase branches with automatic backup, conflict detection, and recovery guidance.
ALWAYS follow this pattern:
# 1. Create backup
BACKUP="backup-before-rebase-$(date +%Y%m%d-%H%M%S)"
git branch "$BACKUP"
# 2. Verify clean working directory
git status --porcelain # Must be empty
# 3. Execute rebase
git rebase <target-branch>
# 4. Handle conflicts if any (see below)
# 5. Verify result
git log --oneline -10
git diff "$BACKUP" # Content should match (just different history)
# 6. Cleanup backup
git branch -D "$BACKUP"
# When rebase stops due to conflict:
# 1. Check which files have conflicts
git status
# 2. Edit files to resolve conflicts (look for <<<<<<< markers)
# 3. Stage resolved files
git add <resolved-files>
# 4. Continue rebase
git rebase --continue
# If you want to abort:
git rebase --abort
git reset --hard "$BACKUP"
git checkout feature-branch
git rebase main
git rebase -i <base-commit>
# In editor:
# pick - use commit as-is
# reword - change commit message
# edit - stop to amend commit
# squash - combine with previous commit
# fixup - like squash but discard message
# drop - remove commit
# NEVER rebase shared/public branches
git rebase main # While ON main - rewrites shared history!
# NEVER use --all flag
git rebase --all # Rewrites ALL branches!
# SAFE - rebase feature branch onto main
git checkout feature
git rebase main
# If rebase went wrong:
git rebase --abort
# Or restore from backup:
git reset --hard $BACKUP
# Or check reflog:
git reflog
git reset --hard HEAD@{N}
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.