Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.51 ·

.worktreeinclude File Support

Entry
JSON All of v2.1.51
EntryKind: in v2.1.51,
ChangesSection of the release
What

A new configuration file that specifies gitignored files to copy into git worktrees, solving the problem of missing config files or local secrets in worktree-based workflows.

Usage
# Create .worktreeinclude in your project root
# List gitignored files/patterns that should be copied to worktrees:
.env
.env.local
config/local.json
Details
  • Placed at the project root alongside .gitignore
  • When a worktree is created, files matching .worktreeinclude patterns that are also gitignored are automatically copied from the main working directory into the worktree
  • Blank lines and lines starting with # are treated as comments
  • Uses git ls-files --others --ignored --exclude-from=.worktreeinclude to identify matching files
Evidence

New function lc4 reads .worktreeinclude and copies files (search for ".worktreeinclude")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.51 →

Feedback