Appearance
git worktree-list
List all worktrees with status information
TIP
This command is also available as daft list. See daft list.
Description
Lists all worktrees in the current project with enriched status information including uncommitted changes, ahead/behind counts vs. both the base branch and the remote tracking branch, branch age, and last commit details.
Each worktree is shown with:
- A
>marker for the current worktree - Branch name, with
✦for the default branch - Relative path from the current directory
- Ahead/behind counts vs. the base branch (e.g. +3 -1)
- File status: +N staged, -N unstaged, ?N untracked
- Remote tracking status: ⇡N unpushed, ⇣N unpulled
- Branch age since creation (e.g. 3d, 2w, 5mo)
- Last commit: shorthand age + subject (e.g. 1h fix login bug)
Ages use shorthand notation: <1m, Xm, Xh, Xd, Xw, Xmo, Xy.
Use -b / --branches to also show local branches without a worktree. Use -r / --remotes to also show remote tracking branches. Use -a / --all to show both (equivalent to -b -r).
Non-worktree branches are shown with dimmed styling and blank Path/Changes columns.
Use --stat lines to show line-level change counts (insertions and deletions) instead of the default summary (commit counts for base/remote, file counts for changes). This is slower as it requires computing diffs for each worktree.
Use --json for machine-readable output suitable for scripting.
Use --columns to select which columns are shown and in what order. Replace mode: --columns branch,path,age (exact set and order) Modifier mode: --columns -annotation,-last-commit (remove from defaults) Add optional: --columns +size (add disk size column after path) Defaults can be set in git config with daft.list.columns.
The size column is not shown by default. Add it with --columns +size to see the disk size of each worktree folder in human-readable format (e.g. 42K, 1.3M, 2.5G). A summary row at the bottom shows the total size across all worktrees.
Use --sort to control the sort order. Prefix with + for ascending (default) or
- for descending. Multiple columns can be comma-separated for multi-level sort. Sort by branch descending: --sort -branch Sort by owner then size: --sort +owner,-size Most recent activity first: --sort -activity
Sortable columns: branch, path, size, age, owner, hash, activity, commit (alias: last-commit). activity considers both commits and uncommitted file changes; commit sorts by last commit time only. You can sort by columns not shown in the output (e.g. --sort -size without --columns +size). Defaults can be set with daft.list.sort.
Usage
git worktree-list [OPTIONS]Options
| Option | Description | Default |
|---|---|---|
--json | Output in JSON format | |
-v, --verbose | Be verbose; show detailed progress | |
-b, --branches | Also show local branches without a worktree | |
-r, --remotes | Also show remote tracking branches | |
-a, --all | Show all branches (equivalent to -b -r) | |
--stat <STAT> | Statistics mode: summary or lines (default: from git config daft.list.stat, or summary) | |
--columns <COLUMNS> | Columns to display (comma-separated). Replace: branch,path,age. Modify defaults: +col,-col. Available: branch, path, size, base, changes, remote, age, annotation, owner, hash, last-commit | |
--sort <SORT> | Sort order (comma-separated). +col ascending, -col descending. Columns: branch, path, size, base, changes, remote, age, owner, hash, activity, commit |
Global Options
| Option | Description |
|---|---|
-h, --help | Print help information |
-V, --version | Print version information |