Config File Locator

Git


Higher-priority files override the same setting in lower-priority files.

  1. Local level

    Highest priority

    Applies only to one Git repository.

    Config file location
    <repository>/.git/config
    Commands
    git config --local --edit
  2. Global level

    Second priority

    Applies to your user account.

    Config file location
    ~/.gitconfig
    $XDG_CONFIG_HOME/git/config
    Git also reads this user-specific file when present.
    Commands
    git config --global --edit
  3. System level

    Third priority

    Applies to every user on this Git installation.

    Config file location
    $(prefix)/etc/gitconfig
    Commands
    git config --system --edit

Inspect configuration
git config --list --show-origin --show-scope

Official Git documentation