Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.326 ·

Claude is stopped from running git commands that could move your branches

Claude Code can now flag git commands like update-ref, reflog or filter-branch that, run from a worktree, could change your own branches

You'll notice Improvements
JSON All of v2.1.326
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
WorktreesArea: what it touches
ImprovementsKind: in v2.1.326,
ImprovementsSection of the release

Unclear It is not known whether the check is switched on by default, so it may not be active for you.

What

A worktree is a separate working copy of a git repository that shares the same branches as your main copy. Claude can work in one so its changes stay apart from yours. Some git commands run in a worktree can still move or rewrite your own branches.

Claude Code now has a check that flags these git commands when Claude runs them through its shell tool:

  • update-ref
  • symbolic-ref
  • replace
  • reflog
  • filter-branch
  • worktree
  • refs
  • history

When one is flagged, Claude Code gives advice on what to do instead and tells Claude to leave your branches as they are, even to undo a mistake. The check is controlled by a setting that is switched on from Anthropic's servers.

Why

This protects your branches from changes made by Claude while it works in a worktree.

How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not known whether the check is switched on by default, so it may not be active for you.

See this entry in the whole of v2.1.326 →

Feedback