{"version":"2.1.285","anchor":"git-worktree-cleanup-is-vetted-against-the-git-dir","canonical_anchor":"git-worktree-cleanup-is-vetted-against-the-git-dir","heading":"Git worktree cleanup now confirms the repository first","tier":"notice","area":"Worktrees","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285\/e\/git-worktree-cleanup-is-vetted-against-the-git-dir","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285","markdown":"### Git worktree cleanup now confirms the repository first\n\nBefore listing or removing git worktrees, Claude Code now confirms the git directory and does nothing if it cannot\n\n**What**\n\nA git worktree is an extra working folder attached to the same repository. Claude Code can clean these up.\n\nIt used to run `git worktree remove --force` directly. It now points git at a checked `--git-dir` when listing and removing worktrees. If it cannot confirm that git directory, it does not run git and says so. Git's records of worktrees whose folders no longer exist are now removed separately.\n\n**Why**\n\nThis stops cleanup from acting on the wrong repository's worktrees.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5"}