What Is Git Config File

What Is Git Config File

The Git configuration file contains a number of variables that affect the Git commands’ behavior. The . git/config file in each repository is used to store the configuration for that repository, and $HOME/. gitconfig is used to store a per-user configuration as fallback values for the . git/config file.

What is the difference between git config global and local?

System vs Global vs Local Git config Global Git config controls settings for the currently logged in user and all his repositories. Local Git config controls settings for a specific repository. These 3 config files are executed in a cascading order.

Where is git config file in Linux?

On Linux, the config file will remain in the /etc/gitconfig . In macOS, there is a file called as /usr/local/git/etc/gitconfig .

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.