Dissecting Git configuration
In the first part of this chapter, you will learn how to enhance our Git configuration to better fit your needs and speed up the daily work: it's time to become familiar with configuration internals.
Configuration architecture
Configuration options are stored in plain text files. The git config
command is just a convenient tool to edit these files without the hassle of remembering where they are stored and opening them in a text editor.
Configuration levels
In Git, we have three configuration levels:
- System
- Global (user-wide)
- Repository
There are different configuration files for every different configuration level.
You can basically set every parameter at every level, according to your needs. If you set the same parameters at different levels, the lowest-level parameter hides the top-level ones; so, for example, if you set user.name
at the global level, it will hide the one eventually set up at the system level, and if you set it at the repository level, it will hide...