/using-git-worktrees
Using Git Worktrees
Isolated workspaces per feature. Safe directory selection, gitignore check, no accidental commits of worktree junk.
What it does
Creates a git worktree with deliberate safety: checks for existing `.worktrees/` or `worktrees/`, reads CLAUDE.md for a preference, asks the user only when neither is available. Verifies the directory is gitignored before creating anything, so worktree contents never sneak into a commit. Global-directory option when project-local isolation isn't wanted.
Use it when starting feature work that needs isolation from the current workspace, before executing an implementation plan that will touch many files, or when running parallel experiments that shouldn't stomp on each other. Don't use it for a one-file tweak. Overhead isn't worth it.
Outputs a ready-to-use worktree at a known path, with the right branch checked out and the directory verified gitignored. Pairs with `executing-plans` (the plan that often wants isolation), `subagent-driven-development` (the parallel workflow that benefits from worktrees), and `finishing-a-development-branch` (the cleanup step when the work is done).
