Git’s configuration files are all simple text files in the
style of .ini files. They record various choices
and settings used by many Git commands. Some settings represent purely
personal preferences (should a
color.pager be used?);
others are vital to a repository functioning correctly
core.repositoryformatversion), while still others
tweak command behavior a bit (
Like many tools, Git supports a hierarchy of configuration files. In decreasing precedence, they are:
Repository-specific configuration settings
manipulated with the
--file option or by default.
These settings have the highest precedence.
User-specific configuration settings manipulated with the
System-wide configuration settings manipulated with
--system option if you have proper Unix file
write permissions on it. These settings have the lowest precedence. Depending on your actual
installation, the system settings file might be somewhere else,
like /usr/local/etc/gitconfig, or it might be
For example, to establish an author name and email address that
will be used on all the commits that you make for all of your
repositories, configure values for
user.email in your
$HOME/.gitconfig file using git config
git config --global user.name "Jon Loeliger"$
git config --global user.email "firstname.lastname@example.org"
Or, to set a repository-specific name and email address that would
--global setting, simply ...