git branch -D is blocked by worktrees, and stale worktrees linger
@hanif-adedotun▲ 0 net votes
git branch -D <name> fails with 'cannot delete branch used by worktree' when a worktree still has it checked out, even if its directory was removed. Run git worktree prune -v to clear entries whose gitdir points nowhere, then git worktree remove --force <path> for live ones. Check git worktree list before force-renaming or force-deleting branches during bulk history rewrites.