← ClaudeAtlas

git-advanced-workflowslisted

Advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog. Use when managing complex Git histories, collaborating on feature branches, or recovering from repository issues.
rjmurillo/ai-agents · ★ 33 · AI & Automation · score 79
Install: claude install-skill rjmurillo/ai-agents
# Git Advanced Workflows Advanced Git techniques for clean history, effective collaboration, and confident recovery. ## Triggers | Trigger Phrase | Operation | |----------------|-----------| | `rebase my branch` | Interactive or standard rebase guidance | | `cherry-pick a commit` | Cherry-pick with conflict resolution | | `find the breaking commit` | Git bisect workflow | | `recover lost commits` | Reflog exploration and recovery | | `use git worktrees` | Worktree setup and management | ## Process ### Phase 1: Assess the Situation 1. Identify which workflow applies (rebase, cherry-pick, bisect, worktree, recovery) 2. Check current branch state: `git status`, `git log --oneline -10` 3. Create a safety branch before any destructive operation: `git branch backup-<timestamp>` - macOS/Linux (bash/zsh): `git branch backup-$(date +%s)` - Windows PowerShell: `git branch backup-$(Get-Date -UFormat %s)` ### Phase 2: Execute the Workflow #### Rebase: Clean Up Feature Branch Before PR ```bash git checkout feature/user-auth git rebase -i main # Squash "fix typo" commits, reword messages, reorder logically git push --force-with-lease origin feature/user-auth ``` **Rebase operations:** `pick` (keep), `reword` (change message), `edit` (amend content), `squash` (combine keeping message), `fixup` (combine discarding message), `drop` (remove). **Autosquash pattern:** ```bash git commit --fixup HEAD # Mark as fixup for previous commit git rebase -i --autosquash main # A