---
name: worktree-registered-at-dot-git-refuses-both-paths
description: "A worktree whose registration records <dir>\.git as the worktree PATH cannot be removed by `git worktree remove` at all — both the dir and the registered path refuse; delete the subtree and let `prune` retire the entry"
metadata:
  node_type: memory
  type: project
---

Measured 2026-09-08 (todlando, `.worktrees/ws272-w3-drift`). `git worktree list --porcelain`
showed the worktree path as `...\.worktrees\ws272-w3-drift\.git` — the `.git` file, not the dir.
Both removal forms refused, rc=128 each:

- `git worktree remove --force .worktrees/ws272-w3-drift` → `fatal: ... is not a working tree`
- `git worktree remove --force .worktrees/ws272-w3-drift/.git` → `fatal: validation failed,
  cannot remove working tree: '...\ws272-w3-drift\.git/.git' does not exist`

There is no path that satisfies it: git appends `/.git` to whatever you name, and the
registration already ends in `.git`.

**Why:** the refusal is not a pin and not a dirty tree, so the reflex reads ("something holds it",
"force harder") both send you at the wrong thing. It is a malformed registration, and the verb
that fixes it is `prune`, not `remove`.

**How to apply:** on a `worktree remove` refusal, read the registered path out of
`git worktree list --porcelain` FIRST. If it ends in `\.git`, stop trying to remove: read
`git status` in the tree, confirm the branch is pushed, preserve the `.spt`/`.spt-*` records
(see [[git-status-cannot-see-gitignored-records]] — but note its CORRECTED cause: these are NOT
gitignored, they surface in PLAIN `git status`, so an `--ignored`-only sweep is the wrong net), delete the SUBTREE, then `git worktree prune -v`
— it retires the entry and says so (`gitdir file points to non-existent location`). Distinct from
[[worktree-remove-partial-failure-reads-total]] (content gone, entry pinned) and from
[[worktree-remnant-pinned-at-crates-spt-daemon]] (a live handle). A git refusal halts and does not
authorise a force — see [[a-git-refusal-halts-the-script-and-a-tree-answers-git-status-before-it-dies]].
