Skip to content

locked-worktree

worktree

primary worktree on main + 1 linked worktree locked with a reason

A repository with one linked worktree that has been locked via
`git worktree lock`. Locked worktrees appear in `git worktree list`
with a `locked <reason>` annotation and resist removal without `--force`.

Useful for testing:
  - worktree list rendering when a worktree is locked
  - locked-worktree badge / indicator in the worktree panel
  - error handling when trying to delete a locked worktree
  - unlock flow (`git worktree unlock`) before safe removal
  • 1 linked worktree exists
  • the linked worktree is locked
  • git worktree list --porcelain shows locked with a reason
  • .git/worktrees/ has a locked file for the linked worktree
worktreelockedin-progress
hotfix/reservedmain
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('locked-worktree')
* c949dcc (HEAD -> main, hotfix/reserved) chore: initial scaffold

Back to Scenario Browser