git-advancedlisted
Install: claude install-skill rcdelfin/agentkit
# Git Advanced Operations Skill
Use advanced commands only on the intended repository and branch. Confirm destructive or history-rewriting operations before running them, and never rewrite published history without explicit approval.
## 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