---
name: backslash-gitdir-blocks-worktree-remove
description: git worktree remove fails "is not a working tree" when .git/worktrees/<n>/gitdir holds a backslash path ending in \.git
metadata:
  type: project
---
Measured todlando 2026-09-22 reaping W1..W5. `git worktree list` showed trees as `C:\...\.worktrees\<n>\.git`; `git worktree remove .worktrees/<n>` said "is not a working tree"; removing by the listed path said "...\.git/.git does not exist". Cause: `.git/worktrees/<n>/gitdir` held a BACKSLASH Windows path, so git never strips the `.git` suffix and treats the .git file as the tree root.

**Why:** many trees under .worktrees/ carry this form, and each owner will hit this when reaping.
**How to apply:** check `git status --porcelain` is empty, rewrite that one gitdir as `C:/.../.worktrees/<n>/.git` (forward slashes), then `git worktree remove` + prune. Touch only your own trees. Related: [[a-git-refusal-halts-the-script-and-a-tree-answers-git-status-before-it-dies]].
