
using-git-worktrees
by Lordsisodia
SISO Agency Internal Platform - Task management and day tracking system with LifeLock integration
SKILL.md
name: using-git-worktrees category: core-infrastructure/development-tools version: 1.0.0 description: Work on multiple features simultaneously without context switching overhead author: obra/superpowers verified: true tags: [git, workflow, productivity, branching, parallel-development]
Skill: Using Git Worktrees
<when_to_use> ✅ Working on multiple features in parallel ✅ Emergency hotfixes while mid-feature ✅ Code reviews requiring actual build/test ✅ Long-running experiments vs. mainline work ✅ Comparing different branch implementations </when_to_use>
Create worktree for existing branch
git worktree add ../my-project-bugfix bugfix-123
Create with detached HEAD
git worktree add ../my-project-exp experiment --detach </create_worktree>
<list_worktrees>
See all worktrees
git worktree list
See with branch details
git worktree list --porcelain </list_worktrees>
<remove_worktrees>
After merging and cleaning up
git worktree remove ../my-project-feature-a
Or prune deleted worktrees
git worktree prune </remove_worktrees> </basic_commands>
Start feature A
git worktree add ../my-project-feature-a feature/add-user-auth
Start feature B (no need to stash or commit partial work!)
git worktree add ../my-project-feature-b feature/payment-integration
Switch between them by cd'ing, no git operations needed
cd ../my-project-feature-a # Work on auth cd ../my-project-feature-b # Work on payments
Fix, test, commit, push hotfix
cd ../my-project-hotfix
... fix and push ...
Clean up
git worktree remove ../my-project-hotfix
<best_practices>
Name worktrees descriptively: ../project-branch-name
Keep worktrees in sibling directories to main repo
Remove worktrees after merge to avoid clutter
Use git worktree prune regularly
Each worktree has its own git stash, index, and working state
</best_practices>
<integration_notes> <claude_integration> When managing parallel work, say:
- "Create a worktree for [feature] while I finish [current work]"
- "Help me clean up old worktrees"
- "Set up worktrees for reviewing PRs 123, 124, and 125"
Claude will:
- Manage worktree creation and cleanup
- Help organize parallel workflows
- Prevent merge conflicts from context switching
- Suggest optimal worktree organization </claude_integration> </integration_notes>
Work on auth
cd ../my-project-feature-a
Make changes, commit, push
Switch to payments (no stash needed)
cd ../my-project-feature-b
Make changes, commit, push
Cleanup after merge
cd ~/dev/my-project git worktree remove ../my-project-feature-a git worktree remove ../my-project-feature-b
Hotfix comes in
git worktree add ../my-project-hotfix hotfix/critical-security
Fix the hotfix
cd ../my-project-hotfix
Make fix, test, commit, push
Back to feature work (no context switching!)
cd ~/dev/my-project
Continue where you left off
Cleanup
git worktree remove ../my-project-hotfix
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon