⌨️.worktreeinclude
Also known as .worktreeinclude file
The list of files a new worktree needs, like .env.
Think of it like
It is like a packing list for a trip. It says which things to bring along.
Example
Lucy's app will not start in a worktree, because .env is missing. She lists .env in .worktreeinclude, and new worktrees start fine.
Why it matters
Without it, each new worktree starts broken, since its secrets are not there.
Definition
Example code
console
.env
.env.local
config/secrets.jsonCommon mistake
Key takeaways
- 1Project root. One file.
- 2gitignore syntax. Patterns.
- 3Ignored files only. Tracked are skipped.