{"version":"2.1.274","anchor":"new-git-repo-verification-and-auto-stash-helpers-for-telepor","canonical_anchor":"teleport-git-operations-now-scoped-to-the-correct-worktree-c","heading":"Teleport's git helpers now target the right checkout, verify it, and can auto-stash changes","tier":"internal","area":"Git Teleport","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274\/e\/new-git-repo-verification-and-auto-stash-helpers-for-telepor","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274","markdown":"### Teleport's git helpers now target the right checkout, verify it, and can auto-stash changes\n\nGit operations used by Claude Code's teleport feature now run against the correct working directory and can auto-stash uncommitted changes first\n\n**What**\n\n- Internal git helpers used for the \"teleport\" feature (upstream-set, branch checkout, current-branch lookup) now resolve a stable checkout root via a new helper and pass an explicit working directory and environment to every git subprocess, instead of relying on the process's ambient working directory.\n\n- A new verification step checks that the checkout's `.git` entry actually points back to the resolved repository, throwing an error (\"Could not verify this checkout's git repository\") if it doesn't.\n\n- A new auto-stash helper stages untracked files and runs `git stash push --message`, backing a new \"Teleport auto-stash\" flow that stashes uncommitted changes before teleporting.\n\n**Why**\n\nThis prevents teleport's git commands from accidentally acting on the wrong repository or directory, and avoids losing uncommitted work by stashing it automatically before switching.\n\n- Area: Git Teleport\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 1\/5"}