Languages
[Edit]
EN

git config --system vs git config --global

3 points
Created by:
Kenya-Spears
800

In this short article we would like to explain the difference between git config --system and git config --global.

Quick answer:

--system sets/gets configurations for entire operating system,

--global sets/gets configurations for logged in user account in the operating system.

From git-config documentation:

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

For writing options: write to global ~/.gitconfig file rather than the repository .git/config, write to $XDG_CONFIG_HOME/git/config file if this file exists and the ~/.gitconfig file doesn’t.

For reading options: read only from global ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.

Read more

  1. https://git-scm.com/docs/git-config - official git-config documentation
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Git

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join