Using Git Worktrees
Using Git Worktrees
Overview
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: Systematic directory selection + safety verification = reliable isolation.
Announce at start: "I'm using the Using Git Worktrees skill to set up an isolated workspace."
Directory Selection Process
Follow this priority order:
1. Check Existing Directories
# Check in priority order
ls -d .worktrees 2>/dev/null # Preferred (hidden)
More from obra/superpowers-skills
getting started with skills
Skills wiki intro - mandatory workflows, search tool, brainstorming triggers
291test-driven development (tdd)
Write the test first, watch it fail, write minimal code to pass
10brainstorming ideas into designs
Interactive idea refinement using Socratic method to develop fully-formed designs
10writing plans
Create detailed implementation plans with bite-sized tasks for engineers with zero codebase context
8systematic debugging
Four-phase debugging framework that ensures root cause investigation before attempting fixes. Never jump to solutions.
8code review reception
Receive and act on code review feedback with technical rigor, not performative agreement or blind implementation
7