Skip to main content
LazyWorktree provides a flexible configuration system with multiple levels of precedence, allowing you to customize behaviour globally, per-repository, or via command-line flags.

Configuration Precedence

Settings are resolved in the following order (highest to lowest priority):
  1. CLI flags - Command-line arguments passed with --config
  2. Git local configuration - Repository-specific settings using git config --local
  3. Git global configuration - User-wide settings using git config --global
  4. YAML configuration file - ~/.config/lazyworktree/config.yaml
  5. Built-in defaults - Sensible defaults for all settings
This means CLI flags override everything, followed by git config (local first, then global), then your YAML file, and finally the built-in defaults.

Configuration File Location

The default configuration file location is:
~/.config/lazyworktree/config.yaml
You can override this location using the --config flag:
lazyworktree --config /path/to/custom-config.yaml

Example Configuration

For a complete example configuration with all available options, see config.example.yaml in the source repository.

Configuration Sections

Settings

All configuration settings organised by category

Themes

Built-in themes and custom theme system

Git Config

Using git config for settings

.wt Files

Repository-specific hooks and commands

Branch Naming

Branch naming conventions and templates

Custom Commands

Define custom keybindings and commands

Default Worktree Location

By default, worktrees are created in:
~/.local/share/worktrees/<organization>-<repo_name>
You can customise this location using the worktree_dir setting.

Build docs developers (and LLMs) love