{"version":"2.1.51","anchor":"worktreeinclude-file-support","canonical_anchor":"worktreeinclude-file-support","heading":".worktreeinclude File Support","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.51\/e\/worktreeinclude-file-support","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.51","markdown":"### `.worktreeinclude` File Support\n\n**What**\n\nA 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.\n\n**Usage**\n\n`# 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\"`)"}