---
url: https://docs.mochiexec.io/reference/cli/mochi_worktree.md
description: Manage git worktrees for the current repository.
---

# mochi worktree

Manage git worktrees for the current repository.

## Synopsis

Manage git worktrees for the current repository. Worktrees are lightweight
working copies that share the same repository but can have different branches
checked out simultaneously. Each worktree is auto-discovered as a flow workspace.

Use 'worktree add' to create a new branch and worktree, 'worktree list' to see
all worktrees with their status, and 'worktree prune' to clean up stale ones.

## Options

| Flag | Type | Description |
|------|------|-------------|
| `-h, --help` |  | help for worktree |

## Options inherited from parent commands

| Flag | Type | Description |
|------|------|-------------|
| `-L, --log-level` | `string` | Log verbosity level (debug, info, fatal) (default "info") |
| `--sync` |  | Sync the executable cache first, pulling git-sourced workspaces from their remotes |

## See also

* [mochi](mochi.md) — Run and organize your development tasks
* [mochi worktree add](mochi_worktree_add.md) — Create a new worktree and branch.
* [mochi worktree list](mochi_worktree_list.md) — List all worktrees for the current repository.
* [mochi worktree prune](mochi_worktree_prune.md) — Remove stale worktree entries and optionally clean up merged branches.
* [mochi worktree remove](mochi_worktree_remove.md) — Remove a worktree.
