Problem
When creating a new worktree with wt switch --create, the worktree directory name is always derived from the branch name. For branches using / separators (e.g. feature/JIRA-1234), the slash is sanitized to a dash, giving a directory like feature-JIRA-1234. There is no way to specify a different directory name on the command line.
Example:
wt switch --create feature/JIRA-1234 → directory feature-JIRA-1234, branch feature/JIRA-1234
If I want the directory to be named something descriptive like navigation-animation-refactor while the branch is feature/JIRA-1234, there's currently no way to do this.
Desired behavior
An option (e.g. --path or --name) that lets you specify the worktree directory path independently of the branch name:
wt switch --create feature/JIRA-1234 --path navigation-animation-refactor
This would create a branch called feature/JIRA-1234 with the worktree at a directory called navigation-animation-refactor — exactly what git worktree add already supports:
git worktree add -b feature/JIRA-1234 ../navigation-animation-refactor
# or
git worktree add ../navigation-animation-refactor feature/JIRA-1234
Workaround
Today the only workaround is to drop down to git worktree add directly, which bypasses all of worktrunk's hooks, path templating, and shell integration.
Notes
Problem
When creating a new worktree with
wt switch --create, the worktree directory name is always derived from the branch name. For branches using/separators (e.g.feature/JIRA-1234), the slash is sanitized to a dash, giving a directory likefeature-JIRA-1234. There is no way to specify a different directory name on the command line.Example:
wt switch --create feature/JIRA-1234→ directoryfeature-JIRA-1234, branchfeature/JIRA-1234If I want the directory to be named something descriptive like
navigation-animation-refactorwhile the branch isfeature/JIRA-1234, there's currently no way to do this.Desired behavior
An option (e.g.
--pathor--name) that lets you specify the worktree directory path independently of the branch name:This would create a branch called
feature/JIRA-1234with the worktree at a directory callednavigation-animation-refactor— exactly whatgit worktree addalready supports:Workaround
Today the only workaround is to drop down to
git worktree adddirectly, which bypasses all of worktrunk's hooks, path templating, and shell integration.Notes
worktree-pathconfig template controls the base path but not the per-invocation leaf name