Git worktrees
Manage parallel git worktrees for concurrent feature development, long test runs alongside coding, or hotfix work without losing main feature context. Triggers include "worktree", "parallel branches", "isolate this work", "hotfix without losing context".From its SKILL.md
npx -y skills add tapway/tapway-superpowers --skill git-worktreesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.3 KB, as published. Nobody here has run it
Skill: Git Worktrees
When to invoke: Parallel feature development, running long tests while continuing to code, working on hotfix while main feature work is in progress.
What Are Worktrees?
Git worktrees let you check out multiple branches simultaneously in different directories. Each worktree is independent — you can run tests in one while writing code in another.
Common Commands
# Create a new worktree for a feature branch
git worktree add ../[project]-feat-auth feat/user-auth
# Create a worktree for a new branch (doesn't exist yet)
git worktree add -b feat/payments ../[project]-payments
# List all worktrees
git worktree list
# Remove a worktree when done
git worktree remove ../[project]-feat-auth
# Prune stale worktree references
git worktree prune
Workflow for Parallel Development
main repo dir/ ← main branch, production
../project-feat-A/ ← feat/feature-a branch
../project-fix-B/ ← fix/urgent-bug branch
Step-by-step
- Finish your current work or stash it
- Create a worktree:
git worktree add -b feat/[name] ../[project]-[name] - Open a new terminal tab and
cd ../[project]-[name] - Work in the new worktree — it has its own index, but shares the
.gitrepo - When implementation is done: run
/simplify→/review→/pr(add/cleanupfirst if on tapway-claude-template) — never push manually - After the PR is merged, clean up:
git worktree remove ../[project]-[name] && git worktree prune
With Subagents
Worktrees are ideal when dispatching parallel subagents (see tdd skill):
- Dispatch Agent A to worktree-1 (feature X)
- Dispatch Agent B to worktree-2 (feature Y)
- Both work simultaneously without conflicting
Gotchas
- Each worktree needs its own
.env/node_modulesif applicable - You can't check out the same branch in two worktrees simultaneously
- Worktree directories should be siblings of the main repo, not nested inside it
- Always clean up stale worktrees:
git worktree prune