You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve worktree UX: add optional guidance for caching and env setup #299
claude-codeClaude Code (Anthropic CLI) issuesenhancementNew feature or requeststaleNo activity for 60+ daysworktreesRetired: use skill:using-git-worktrees
Is your feature request related to a problem? Please describe.
Yes. The worktree workflow often requires re-installing dependencies and re-configuring environment variables in each new worktree, which adds noticeable setup cost for small or frequent tasks.
In my experience, each new worktree doesn’t automatically pick up environment configuration from the repo root (e.g., .env / .envrc). I end up re‑configuring it manually every time, which often blocks me at this step and makes the workflow feel less smooth.
Describe the solution you'd like
Add a short optional, example-based section (docs or skill notes) on reducing worktree setup cost, without prescribing a single tool, e.g.:
Dependency caching: suggest leveraging package-manager caches/shared stores to reduce repeated downloads/installs (e.g., pnpm store; for Python, uv could be an option)
Env vars: provide a common per-worktree env management approach (e.g., .env / .envrc example or a small bootstrap snippet) and explain how new worktrees can more smoothly inherit root env config
Describe alternatives you've considered
Keep the current workflow and accept the overhead
Maintain custom scripts per project for caching/env setup
Additional context
This is documentation-only guidance and does not change core worktree behavior; it just offers optional optimization tips.
Reacted by David Zadražil, Cyrus Cui, David Belt, Santiago Rodriguez and biruktesfayeve
Reacted by backtrack, Cyrus Cui and Santiago Rodriguez
Thanks for the suggestion. I’m going to close this because dependency-cache and environment setup patterns vary a lot by language, package manager, shell, and project conventions. Adding generic advice here would likely become noisy or project-specific guidance in the core worktree skill.
Project-local setup scripts or repo docs are the better place for this kind of optimization.
claude-codeClaude Code (Anthropic CLI) issuesenhancementNew feature or requeststaleNo activity for 60+ daysworktreesRetired: use skill:using-git-worktrees
Activity
feat(using-git-worktrees): rework to layer on native EnterWorktree
feat(using-git-worktrees): rework to layer on native EnterWorktree
feat(using-git-worktrees): rework to layer on native EnterWorktree
arittr commentedon May 11, 2026
Thanks for the suggestion. I’m going to close this because dependency-cache and environment setup patterns vary a lot by language, package manager, shell, and project conventions. Adding generic advice here would likely become noisy or project-specific guidance in the core worktree skill.
Project-local setup scripts or repo docs are the better place for this kind of optimization.