Skip to main content

Git config

Git configuration is managed from chezmoi source and installed into $HOME.

ConcernSource
Main git config templatehome/private_readonly_dot_gitconfig.tmpl
Work overridehome/work/private_dot_gitconfig.tmpl
Allowed signershome/private_dot_ssh/private_executable_allowed_signers.tmpl
Git TUIshome/dot_config/exact_lazygit/, home/dot_config/exact_gitui/, home/dot_config/exact_tig/

Conditional identity

On non-work machines, the primary gitconfig uses includeIf "gitdir:~/work/" so repositories under ~/work/ automatically use the secondary/work identity.

Check the active value and the file that set it:

git config --show-origin --get user.name
git config --show-origin --get user.email
git config --show-origin --get core.sshCommand

Large repositories

The global gitconfig avoids repository-size-specific defaults such as core.fsmonitor, feature.manyFiles, and feature.experimental. Large repositories opt into performance settings through their local .git/config, so small repos do not spawn fsmonitor daemons or inherit experimental Git defaults.

For very large worktrees such as Kibana and Elasticsearch, keep maintenance, index, and untracked-cache settings repo-local. Avoid scalar register as durable setup in this chezmoi-managed environment because it writes scalar.repo and maintenance.repo paths into the managed global gitconfig, and the next chezmoi apply removes them. Keep core.fsmonitor=false unless a repo-specific benchmark proves the daemon is safe and worthwhile for that worktree.

Signing

Commit signing uses SSH signing through the 1Password signing helper. The public key selector lives on disk; the private key stays in 1Password.

Relevant files:

GitHub CLI and dashboard config

ComponentSource
GitHub CLI confighome/dot_config/exact_private_gh/
gh picker work confighome/dot_config/exact_tmux/exact_scripts/pickers/github/readonly_gh-picker-work.yml
gh picker home confighome/dot_config/exact_tmux/exact_scripts/pickers/github/readonly_gh-picker-home.yml
Managed extensions hookrun_onchange_after_05-install-gh-extensions.fish.tmpl