Configuration targets
In this section, we will look at the different layers that can be configured. The layers are:
SYSTEM
: This layer is system-wide and found in/etc/gitconfig
GLOBAL
: This layer is global for the user and found in~/.gitconfig
LOCAL
: This layer is local to the current repository and found in.git/config
Getting ready
We will use the jgit
repository for this example; clone it or use the clone you already have from Chapter 1, Navigating Git, as shown in the following command:
$ git clone https://git.eclipse.org/r/jgit/jgit $ cd jgit
How to do it...
In the previous example, we saw how we could use the command git config --list
to list configuration entries. This list is actually made from three different levels of configuration that Git offers: system-wide configuration, SYSTEM
; global configuration for the user, GLOBAL
; and local repository configuration, LOCAL
.
For each of these configuration layers, we can query the existing configuration. On a Windows box with a default installation...