{"version":"2.1.334","anchor":"worktreeinclude-ignored-file-lookup-reworked","canonical_anchor":"worktreeinclude-ignored-file-lookup-reworked","heading":"Worktree creation handles non-ASCII filenames and picks the default branch first","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/worktreeinclude-ignored-file-lookup-reworked","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### Worktree creation handles non-ASCII filenames and picks the default branch first\n\n.worktreeinclude now matches non-ASCII filenames, and new worktrees start from the repo's default branch, falling back to main\n\n**Unclear.** It is not clear whether the set of files copied into a worktree is now different.\n\n**What**\n\nA worktree is a second working copy of a git repository that Claude Code can create so work happens separately. A `.worktreeinclude` file lists ignored files, such as local config, to copy into it.\n\n- Ignored files are now found through a new `git ls-files` helper instead of running `git ls-files --others --ignored --exclude-standard` directly, and the results go through an extra filtering step. This may change which files `.worktreeinclude` copies.\n\n- The helper runs with `core.quotePath=false` and decodes non-ASCII filenames, such as names with accents or non-Latin letters, so `.worktreeinclude` patterns can match them.\n\n- The base branch for a new worktree now comes from the repository's default branch first and falls back to \"main\". Before, it fell back to `HEAD`, the commit you currently have checked out.\n\n- Error text from git is now cleaned up in one place.\n\n**Why**\n\nRepositories with non-ASCII filenames should now get the right files copied into new worktrees. New worktrees may also start from a different branch than before, so check the base if you relied on the old behaviour.\n\n- Area: Worktrees\n- Names: `.worktreeinclude`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}