From wshobson-git-advanced-workflows
Master advanced Git workflows including interactive rebase, cherry-picking, bisect, worktrees, and reflog for clean history management and recovery.
How this skill is triggered — by the user, by Claude, or both
Slash command
/wshobson-git-advanced-workflows:git-advanced-workflowsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Master advanced Git techniques to maintain clean history, collaborate effectively, and recover from any situation with confidence.
Master advanced Git techniques to maintain clean history, collaborate effectively, and recover from any situation with confidence.
Interactive rebase is the Swiss Army knife of Git history editing.
Common Operations:
pick: Keep commit as-isreword: Change commit messageedit: Amend commit contentsquash: Combine with previous commitfixup: Like squash but discard messagedrop: Remove commit entirelyBasic Usage:
# Rebase last 5 commits
git rebase -i HEAD~5
# Rebase all commits on current branch
git rebase -i $(git merge-base HEAD main)
# Rebase onto specific commit
git rebase -i abc123
Apply specific commits from one branch to another without merging entire branches.
# Cherry-pick single commit
git cherry-pick abc123
# Cherry-pick range of commits (exclusive start)
git cherry-pick abc123..def456
# Cherry-pick without committing (stage changes only)
git cherry-pick -n abc123
# Cherry-pick and edit commit message
git cherry-pick -e abc123
Binary search through commit history to find the commit that introduced a bug.
# Start bisect
git bisect start
# Mark current commit as bad
git bisect bad
# Mark known good commit
git bisect good v1.0.0
# Git will checkout middle commit - test it
# Then mark as good or bad
git bisect good # or: git bisect bad
# Continue until bug found
# When done
git bisect reset
Automated Bisect:
# Use script to test automatically
git bisect start HEAD v1.0.0
git bisect run ./test.sh
# test.sh should exit 0 for good, 1-127 (except 125) for bad
Work on multiple branches simultaneously without stashing or switching.
# List existing worktrees
git worktree list
# Add new worktree for feature branch
git worktree add ../project-feature feature/new-feature
# Add worktree and create new branch
git worktree add -b bugfix/urgent ../project-hotfix main
# Remove worktree
git worktree remove ../project-feature
# Prune stale worktrees
git worktree prune
Your safety net - tracks all ref movements, even deleted commits.
# View reflog
git reflog
# View reflog for specific branch
git reflog show feature/branch
# Restore deleted commit
git reflog
# Find commit hash
git checkout abc123
git branch recovered-branch
# Restore deleted branch
git reflog
git branch deleted-branch abc123
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
# Safe force push
git push --force-with-lease origin feature/branch
# Create backup before risky operation
git branch backup-branch
git rebase -i main
# If something goes wrong
git reset --hard backup-branch
# Abort operations in progress
git rebase --abort
git merge --abort
git cherry-pick --abort
git bisect reset
# Restore file to version from specific commit
git restore --source=abc123 path/to/file
# Undo last commit but keep changes
git reset --soft HEAD^
# Undo last commit and discard changes
git reset --hard HEAD^
# Recover deleted branch (within 90 days)
git reflog
git branch recovered-branch abc123
3plugins reuse this skill
First indexed Jul 7, 2026
npx claudepluginhub p/wshobson-wshobson-git-advanced-workflows-plugins-developer-essentials-skills-git-advanced-workflowsMaster advanced Git workflows including interactive rebase, cherry-picking, bisect, worktrees, and reflog for clean history management and recovery.
Master advanced Git workflows: interactive rebase, cherry-picking, bisect, worktrees, and reflog for clean history, collaboration, and recovery.
Guides advanced Git workflows: rebasing, cherry-picking, bisect, worktrees, reflog for clean history management and recovery from mistakes.