In this section, we will look at the different layers that can be configured. The layers are as follows:
SYSTEM
: This layer is system-wide and can be found in/etc/gitconfig
GLOBAL
: This layer is global for the user and can be found in~/.gitconfig
LOCAL
: This layer is local to the current repository and can be found in.git/config
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
In the previous chapter, 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 the configuration layers, we can query the existing configuration. On a Windows...