Configuration layers
Git reads config from multiple files in order: system, global (~/.gitconfig), local (.git/config), worktree (when enabled), and command-line (-c). Later layers override earlier. Inspect with git config --list --show-origin.
Conditional includes
Apply different settings per directory tree — different signing keys for work and personal, for example: