.emdash.json file at its root to customize Emdash’s behavior for that specific project. This file is optional and should be committed to version control so all team members share the same configuration.
Configuration file location
Place.emdash.json in your project’s root directory (the same directory as your .git folder):
Configuration schema
Here’s the complete schema for.emdash.json:
Preserve patterns
By default, Emdash copies certain gitignored files (like.env files) from your main repository to task worktrees. You can customize which files are preserved using preservePatterns.
Array of glob patterns for files to copy from the main repo to task worktrees. These patterns are matched against gitignored files.Default patterns (if not specified):
Use cases for preserve patterns
Preserve Claude configuration
Preserve Claude configuration
If you use Claude-specific commands or configuration:
Preserve database files
Preserve database files
For local development with SQLite or other file-based databases:
Preserve IDE settings
Preserve IDE settings
Share IDE configuration across worktrees:
Preserve certificates and keys
Preserve certificates and keys
For projects requiring local certificates:
Files in the following directories are never preserved, even if they match patterns:
node_modules.gitvendor.cachedistbuild.next.nuxt__pycache__.venvvenv
Shell setup
Run custom commands when shells are initialized in task worktrees.Shell command(s) to execute when starting a terminal in a task worktree. Useful for activating virtual environments, loading environment variables, or setting up project-specific tools.
Shell setup examples
Activate Python virtual environment
Activate Python virtual environment
Load environment variables
Load environment variables
Setup Node.js version
Setup Node.js version
Multiple commands
Multiple commands
Chain multiple setup commands:
Lifecycle scripts
Define custom scripts that run at different points in a task’s lifecycle.Command to run when a task worktree is first created. Use for one-time setup like installing dependencies.
Command to run when starting work on a task. Use for development servers or watch processes.
Command to run when cleaning up a task worktree. Use for stopping services or cleaning temporary files.
Lifecycle script examples
Full lifecycle for a web app
Full lifecycle for a web app
Docker-based development
Docker-based development
Python project with virtual environment
Python project with virtual environment
Complete examples
Next.js project
.emdash.json
Python Django project
.emdash.json
Docker Compose project
.emdash.json
Monorepo with pnpm
.emdash.json
Branch prefix configuration
To customize the Git branch prefix for tasks, use the application settings (not.emdash.json):
settings.json
your-prefix/task-name-abc instead of the default emdash/task-name-abc.
See Application settings for more details.