--- name: worktrees description: Use when starting new work, renaming a branch, or setting up or converting a repository — each unit of work gets its own git worktree through the `wkt` CLI, opened as a Herdr workspace only when a separate workspace is wanted. --- # Worktrees Each unit of work gets its own git worktree, so parallel work can't trip over one checkout. Create and manage them with `wkt`. It puts each worktree in the right place and starts a new branch from a freshly fetched default branch. While `wkt` is available, don't run `git worktree add` or `herdr worktree create` yourself. `wkt --help` shows each command's options. ## Herdr workspaces are opt-in Inside [Herdr](https://herdr.dev) (`HERDR_TAB_ID` is set), `wkt new` and `wkt rename` also open the worktree as a Herdr workspace, unless given `--no-herdr`. A new workspace is a new place for someone to work, not something you need to work in a worktree yourself. - **Pass `--no-herdr` by default**, including when you create a worktree to do the work yourself from this session. - **Leave it off** only when a separate Herdr workspace is the point: the user asks for one, or the work is meant to carry on there, in another session or by the user. Outside Herdr, `wkt` never talks to it, and `--no-herdr` changes nothing. ## Start new work ```sh wkt new -b [-s ] [-n