git-worktrees
<domain_overview>
๐ณ GIT WORKTREES: ISOLATED WORKSPACES
Philosophy: Isolation prevents contamination. Work on features without affecting the main workspace. Systematic directory selection + safety verification = reliable isolation. ISOLATION INTEGRITY MANDATE (CRITICAL): Never create worktrees in directories that are not explicitly ignored by Git. AI-generated workflows often fail by polluting the primary repository with tracked worktree data. You MUST verify that the destination directory is within
.gitignorebefore execution. Furthermore, you MUST ensure a 'Clean Baseline' by running tests before starting any feature work in a new worktree to avoid cross-contamination of artifacts. </domain_overview>
<directory_selection>
๐ฏ OVERVIEW
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching. Benefits:
- Work on feature branch without stashing changes
- Test in isolation without affecting main workspace
- Run long processes without blocking other work
- Easy cleanup when feature is complete