{"version":"2.1.274","anchor":"worktree-cleanup-git-calls-now-pin-an-explicit-git-dir","canonical_anchor":"worktree-cleanup-git-calls-now-pin-an-explicit-git-dir","heading":"Worktree cleanup git calls now pin an explicit --git-dir","tier":"internal","area":"Git Worktrees","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274\/e\/worktree-cleanup-git-calls-now-pin-an-explicit-git-dir","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274","markdown":"### Worktree cleanup git calls now pin an explicit --git-dir\n\nWorktree cleanup git commands now explicitly pin the git directory instead of relying on current folder\n\n**What**\n\nThe logic that removes or verifies worktrees (used when exiting or cleaning one up) now resolves the git directory up front and passes it explicitly via `--git-dir` to every subsequent `git worktree list` and `git worktree remove` command, instead of letting git discover it based on the current working directory.\n\n**Why**\n\nThis makes worktree cleanup more reliable by pointing git at the correct repository directly, avoiding cases where relying on the current directory could pick the wrong git directory.\n\n- Area: Git Worktrees\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 0\/5"}