Git Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 10: Line 10:
=Overview=
=Overview=


git maintains configuration in a hierarchy of files, from system-wide configuration in <code>/etc/gitconfig</code>, user-specific configuration in and , to repository specific configuration in. It resolves a configuration element to the most specific value - a repository-level value takes precedence over a user-level values, and a user-level values takes precedence over the corresponding system-level value.
git maintains configuration in a hierarchy of files, from system-wide configuration in <code>/etc/gitconfig</code>, user-specific configuration in and , to repository specific configuration in.
 
<code>/etc/gitconfig</code> contains configuration that applies to all users of the system. <code>git config --system</code> reads and writes this file.
 
 
It resolves a configuration element to the most specific value - a repository-level value takes precedence over a user-level values, and a user-level values takes precedence over the corresponding system-level value.


=Environment Variables=
=Environment Variables=

Revision as of 17:46, 18 July 2019

Internal

Files

Overview

git maintains configuration in a hierarchy of files, from system-wide configuration in /etc/gitconfig, user-specific configuration in and , to repository specific configuration in.

/etc/gitconfig contains configuration that applies to all users of the system. git config --system reads and writes this file.


It resolves a configuration element to the most specific value - a repository-level value takes precedence over a user-level values, and a user-level values takes precedence over the corresponding system-level value.

Environment Variables

Git Environment Variables

Configuration Options

Git Configuration Options

Configuration Operations

git config Configuration Operations