pm worktree¶
Manage git worktrees for tracked projects.
pm worktree list [project] List worktrees (alias: ls)
pm worktree create <project> <branch> Create a worktree
Alias: pm wt
worktree list¶
List git worktrees for one or all tracked projects.
Aliases: ls
Without <project>: Lists worktrees for all tracked projects. Output columns: Project, Branch, Path.
With <project>: Lists worktrees for that project only. Output columns: Branch, Path.
Examples:
worktree create¶
Create a new git worktree for a project on a given branch.
Creates the worktree using the external wt CLI. The worktree path is determined by the wt tool's conventions.
Examples:
pm worktree create my-api feature/new-endpoint
pm wt create my-api bugfix/auth-fix
# Preview without creating
pm wt create my-api feature/test --dry-run
Integration with Agent Sessions¶
When using pm agent launch, a worktree is created automatically. You typically only need pm worktree create for manual worktree management outside of agent sessions.