Project setup
Zero configuration works. Run wt init when a repository needs dependencies,
secrets, generated files, or teardown work in every new worktree.
| File | Contract |
|---|---|
.wt/create |
Executable hook run in the new worktree. $1 is the absolute main checkout path. |
.wt/destroy |
Executable cleanup hook run before worktree removal. Failure warns but does not block removal. |
.wt/config |
key = value configuration with # comments. |
Hooks only run when executable:
chmod +x .wt/create .wt/destroy
Worktree location
Worktrees live at .wt/worktrees by default. wt adds that directory to
.git/info/exclude, keeping the main checkout clean without changing the
project’s .gitignore.
Set an absolute path or one relative to the main checkout to use another location:
worktrees = ../shared-worktrees
Persistence
Worktrees are removed after a successful done or ship unless persistence
is enabled. Resolution is first-match-wins:
--rmor--keeponwt done/wt ship- Branch preference set by
wt persistorwt create --persist persistent = truein.wt/config- Ephemeral by default
Persistent worktrees are rebased in place after merging and remain ready for the next task.