Using Git Worktrees
执行类
Use before starting feature work that needs isolation from current workspace, or before executing an implementation plan.
Quick Start
Understand in 30 Seconds
Create isolated git workspaces sharing the same repository, allowing simultaneous work on multiple branches.
When to Use
- Starting feature work that needs isolation
- Before executing implementation plan
- Need to switch between branches without losing context
Complete Guide
Directory Selection Process
Check Existing Directories
bashls -d .worktrees 2>/dev/null ls -d worktrees 2>/dev/nullCheck CLAUDE.md - Look for preference settings
Ask User - If no directory exists
Safety Validation
Must verify directory is ignored before creating worktree:
bash
git check-ignore -q .worktreesCreation Steps
- Detect project name
- Create Worktree
- Run project setup
- Verify clean baseline
Related Skills
Follow-up Skills
- finishing-a-development-branch - Cleanup worktree