[Feature Request] Configurable untracked file copying for Git worktrees

Resolved 💬 2 comments Opened Feb 18, 2026 by jacwright Closed Mar 19, 2026

Bug Description

Configurable untracked file copying for worktrees

Summary: When Claude Code Desktop creates Git worktrees, allow users to specify which untracked files (like .env, .env.local, config files) should be automatically copied to the new worktree.

Use case: Environment files and local configuration files are typically gitignored but essential for development. Currently, these must be manually copied to each new worktree, which is error-prone and time-consuming.

Proposed solution: Add a configuration option (e.g., in CLAUDE.md, .claude/settings.json, or a dedicated config file) to define a list of untracked files/patterns that should be copied when creating worktrees.

Example configuration:

{
  "worktree": {
    "copyUntrackedFiles": [".env", ".env.local", "config/*.local.json"]
  }
}

Prior art: 1Code supports this functionality.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.44
  • Feedback ID: 8cdcafd8-757b-4a0e-842e-54878889a16c

Errors

[]

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗