Worktree Flow
Decide whether a task deserves an isolated git worktree, create it with a proper branch name, and keep the original checkout clean.
Steps
- Evaluate isolation need — does this task risk conflicting with current work?
- Choose branch name — use
feature/,fix/,chore/, orrefactor/prefix - Create worktree —
git worktree add ../<repo>-<branch> -b <branch> - Report — branch name, worktree path, isolation reason
Output
Branch: <prefix/short-name>
Path: ../<repo>-<branch>
Reason: <why isolation was needed>
Rules
- Stop if the directory is not a git repo
- Never create throwaway branches without a clear reason
- Prefer worktrees over stashing for multi-day parallel work
- Keep the original checkout on its current branch