Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

feat: symlink .env into new worktrees#45

Merged
davidpoblador merged 1 commit intomainfrom
feat/env-symlink
Feb 10, 2026
Merged

feat: symlink .env into new worktrees#45
davidpoblador merged 1 commit intomainfrom
feat/env-symlink

Conversation

@davidpoblador
Copy link
Member

Summary

  • When wt-add creates a worktree, it now symlinks .env from the project root into the new worktree (if available and not already present)
  • Removal scripts (wt-rm, wt-destroy) need no changes: git worktree remove deletes the symlink without touching the target, since .env is gitignored

Test plan

  • Verified git worktree remove cleanly handles gitignored symlinks (normal and --force paths)
  • Verified parent .env is never deleted

🤖 Generated with Claude Code

When wt-add creates a worktree, it now checks for a .env file at the
project root and creates a symlink to it inside the new worktree.

Removal is safe by default: git worktree remove deletes the symlink
without touching the target file, since .env is gitignored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davidpoblador davidpoblador merged commit 0fcfada into main Feb 10, 2026
1 check passed
@davidpoblador davidpoblador deleted the feat/env-symlink branch February 10, 2026 14:13
@claude
Copy link

claude bot commented Feb 10, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant