Git Config Options Reference

All git config keys organized by section with type and scope (system/global/local).

Searchable git config option reference covering core, user, diff, merge, pull, push and remote sections — with value type, default and the scope each key usually belongs to.

What is the difference between system, global and local scope?

System config applies to every user on the machine, global applies to your user account via ~/.gitconfig, and local applies to a single repository via .git/config. Local overrides global, which overrides system.

Look up any git setting fast

Git’s behaviour is driven almost entirely by git config keys spread across many sections — core, user, diff, merge, pull, push, remote and more. This reference lets you search those keys by name or description and filter by section, so you can find the right key and its expected value without leaving the page. Everything runs locally in your browser; nothing is uploaded.

How it works

Each entry lists the fully-qualified key (section.key), the value type or allowed tokens, the scope where the key is normally set, a short description and the default value where one exists. Git reads configuration from three files in order of increasing precedence: system (/etc/gitconfig), global (~/.gitconfig), and local (.git/config). When the same key appears in more than one file, the most specific scope wins. Set a key with:

git config --global push.default simple
git config --local core.autocrlf input

Use --show-origin to discover which file a value came from when something behaves unexpectedly.

Tips and examples

  • init.defaultBranch main changes the name of the first branch in new repos.
  • pull.rebase true makes git pull rebase instead of creating merge commits.
  • merge.conflictStyle zdiff3 shows the common ancestor in conflict markers, which makes resolving conflicts far easier.
  • Define shortcuts with the alias section: git config --global alias.co checkout lets you type git co.
  • A value containing spaces must be quoted on the command line, and a literal # in a value must be quoted because it otherwise starts a comment in the config file.