Skip to content

Copy gitignored files from .worktreeinclude into new worktrees#4

Open
alessionossa wants to merge 1 commit into
simonbs:mainfrom
alessionossa:support-worktreeinclude
Open

Copy gitignored files from .worktreeinclude into new worktrees#4
alessionossa wants to merge 1 commit into
simonbs:mainfrom
alessionossa:support-worktreeinclude

Conversation

@alessionossa
Copy link
Copy Markdown

Add .worktreeinclude support to wut new: after git worktree add succeeds, files listed in <repo>/.worktreeinclude (gitignore syntax) that are also gitignored in the source repo are copied into the new worktree. Tracked files are never duplicated. The behavior is inspired by Claude Code worktrees guide.

Example .worktreeinclude:

.env
.env.local
config/secrets.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant