Advanced git operations including complex rebase strategies, interactive staging, commit surgery, and history manipulation. Use when user needs to perform complex git operations like rewriting history or advanced merging.
View on GitHubgeoffjay/claude-plugins
git
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/geoffjay/claude-plugins/blob/main/plugins/utilities/git/skills/git-advanced/SKILL.md -a claude-code --skill git-advancedInstallation paths:
.claude/skills/git-advanced/# Git Advanced Operations Skill This skill provides comprehensive guidance on advanced git operations, sophisticated rebase strategies, commit surgery techniques, and complex history manipulation for experienced git users. ## When to Use Activate this skill when: - Performing complex interactive rebases - Rewriting commit history - Splitting or combining commits - Advanced merge strategies - Cherry-picking across branches - Commit message editing in history - Author information changes - Complex conflict resolution ## Interactive Rebase Strategies ### Basic Interactive Rebase ```bash # Rebase last 5 commits git rebase -i HEAD~5 # Rebase from specific commit git rebase -i abc123^ # Rebase entire branch git rebase -i main ``` ### Rebase Commands ```bash # Interactive rebase editor commands: # p, pick = use commit # r, reword = use commit, but edit commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like squash, but discard commit message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit ``` ### Squashing Commits ```bash # Example: Squash last 3 commits git rebase -i HEAD~3 # In editor: pick abc123 feat: add user authentication squash def456 fix: resolve login bug squash ghi789 style: format code # Squash all commits in feature branch git rebase -i main # Mark all except first as 'squash' ``` ### Fixup Workflow ```bash # Create fixup commit automatically git commit --fixup=abc123 # Autosquash during rebase git rebase -i --autosquash main # Set autosquash as default git config --global rebase.autosquash true # Example workflow: git log --oneline -5 # abc123 feat: add authentication # def456 feat: add authorization git commit --fixup=abc123 git rebase -i --autosquash HEAD~3 ``` ### Reordering Commits ```bash # Interactive rebase git rebase -i HEAD~5 # In editor, change order: pick def456 feat: add database migration pick abc123 feat: add