git
worktree_error
ai_generated
true
fatal: 'path' is a missing but locked worktree
ID: git/worktree-locked
90%Fix Rate
90%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 2 | active | — | — | — |
Root Cause
Git worktree was deleted from disk but git still tracks it as locked.
genericWorkarounds
-
95% success Unlock and remove: git worktree unlock <path> && git worktree prune
git worktree unlock <path> && git worktree prune
-
92% success Use git worktree prune to clean up stale worktree entries
Use git worktree prune to clean up stale worktree entries
Sources: https://git-scm.com/docs/git-worktree#Documentation/git-worktree.txt-prune
Dead Ends
Common approaches that don't work:
-
Delete .git/worktrees manually
70% fail
May break other valid worktrees
Error Chain
Frequently confused with: