Introducing Conductor Cloud →Skip to docs content
Conductor

Files to copy

Configure gitignored files that Conductor copies into new workspaces

New git worktrees start with tracked files only. That keeps workspaces clean, but it also means untracked files such as .env.local, local service credentials, and machine-specific config do not appear in new Conductor workspaces.

Files to copy solves that problem by copying selected gitignored files from your main checkout into each new local workspace.

For setup steps, see Use Files to copy. For the underlying worktree model, see Git worktrees for coding agents.

Configure Files to copy

You can configure Files to copy in Conductor or in a settings file:

  • In the app, open Settings, select the project, and edit Files to copy.
  • In the repository, add file_include_globs to .conductor/settings.toml when the same patterns should be shared with teammates.

Use this repository configuration when every new workspace should receive the same gitignored files:

.conductor/settings.toml
"$schema" = "https://conductor.build/schemas/settings.repo.schema.json"

file_include_globs = """
.env.local
config/local.json
certs/local/**
"""

Commit .conductor/settings.toml when every teammate should copy the same gitignored local files into new workspaces. For settings file locations and precedence, see User and project settings.

You can also configure shared patterns with .worktreeinclude at the repository root:

.worktreeinclude
.env.local
config/local.json
certs/local/**

Use .worktreeinclude when your project already uses worktree tools that read that file, or when you want a small pattern-only project file. If both .worktreeinclude and file_include_globs exist, .worktreeinclude wins.

What gets copied

Git worktrees do not copy untracked files from your main checkout. That includes:

  • Gitignored environment files such as .env.local, .env.development.local, and .env.test.local.
  • Local config files such as config/local.json, settings.local.json, or *.local.
  • Credentials and tokens such as service account JSON files, API key files, and local certificate files.
  • Local database files, seed data, or fixture files that are intentionally ignored by Git.
  • Dependency folders, cache directories, and generated build output such as node_modules, .next, dist, or target.

Conductor copies a gitignored file into a new local workspace when both of these are true:

  1. The file is gitignored.
  2. The file matches a Files to copy or .worktreeinclude pattern.

Tracked files are already present in the new worktree, so Conductor does not copy them. Untracked files that are not gitignored are not eligible for Files to copy. Generated files, dependency folders, and files that need commands to create them usually belong in a setup script instead.

Files to copy currently runs for local Mac workspaces.

Resolution order

The patterns used for a given repo come from the first source that exists:

  1. .worktreeinclude at the repo root. If present, the file's contents win and the settings UI shows a read-only preview.
  2. Repo settings (Settings -> {repo name} -> Files to copy), stored as file_include_globs in repository settings.
  3. Default pattern .env*.

For project-shared patterns, commit a .worktreeinclude file at the repo root or set file_include_globs in .conductor/settings.toml. .worktreeinclude wins when both exist.

If you add .worktreeinclude or repo settings, those patterns replace the default .env* pattern. Include .env* yourself when you still want Conductor to copy environment files.

Pattern format

.worktreeinclude uses .gitignore syntax. Anthropic documents the same behavior for Claude Code worktrees.

Common pattern rules:

  • Blank lines are ignored.
  • # starts a comment. Escape it as \# when the pattern itself starts with #.
  • ! negates a previous match. Escape it as \! when the pattern itself starts with !.
  • A trailing / matches a directory only.
  • A leading / anchors the pattern to the repo root.
  • A slash in the middle of a pattern makes the pattern relative to the repo root.
  • * matches anything except /.
  • ? matches one character except /.
  • Character ranges such as [0-9] match one character in the range.
  • **/name matches name at any depth.
  • directory/** matches everything inside directory at any depth.
  • a/**/b matches a/b, a/x/b, a/x/y/b, and deeper nested paths.

Examples

Copy common environment files:

.worktreeinclude
.env
.env.*

Copy a root-only local file without copying files with the same name in packages:

.worktreeinclude
/config/local.json

Copy nested secrets config files:

.worktreeinclude
**/secrets.local.json
config/**/local.json

Copy a directory of ignored local data, except examples:

.worktreeinclude
.local-secrets/**
!.local-secrets/**/*.example

On this page