Skip to content

worktree

kind: worktree
name: preview
spec:
branch: feature/preview
base: main
field default
branch the branch to check out; created from base if it does not exist required
repo the repository, relative to the workspace root the workspace root
path where to check it out <cache>/worktrees/<name>
base the starting point of a new branch the repository’s default branch

The worktree is added with git worktree add and removed with git worktree remove when the resource is stopped (its namespace deactivated or its document deleted).

{ "path": "/Users/me/.cache/runy/umka/worktrees/preview", "branch": "feature/preview", "head": "3f9c1e2" }

A process that should run inside it reads the path:

kind: process
name: preview-server
spec:
cmd: pnpm
args: [dev]
cwd: ${ worktree.preview.status.path }