I would like to set git defaults for all users on my system.

Where can I find the global system-wide configuration?

There is no such file as



  • As you're a reputation 11 user: if this answers your question, don't forget to click the grey ☑ under the "0" at the left of this text to accept it, which means "yes, this answer is valid"! – David Foerster Dec 29 '15 at 14:37

If you installed the git* package(s) from the default repositories, the system-wide Git configuration is supposed to reside in /etc/gitconfig (since $(prefix) is empty for those Git installations). See the following git-config(1) manual excerpt:


  • For writing options: write to system-wide $(prefix)/etc/gitconfig rather than the repository .git/config.

  • For reading options: read only from system-wide $(prefix)/etc/gitconfig rather than from all available files.

    See also FILES.



If not set explicitly with --file, there are four files where git config will search for configuration options:

  • $(prefix)/etc/gitconfig

    System-wide configuration file.


If there is no such file, sudo git config --system <name> <value> will create it for you. Alternatively you can create it manually with your favourite text editor. This is the same behaviour as for global (~/.gitconfig) and local ($GIT_DIR/config) Git configuration files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.