Configuring Git
So far, while describing how Git works and how to use it, we have introduced a number of ways to change its behavior. In this section, it will be explained in a systematic fashion how to configure Git operations on a temporary and permanent basis. We will also see how you can make Git behave in a customized fashion by introducing and reintroducing several important configuration settings. With these tools, it’s easy to get Git to work the way you want it to.
Command-line options and environment variables
Git processes the switches that change its behavior in a hierarchical fashion, from the least specific to the most specific one, with the most specific one (and shortest term) taking precedence.
The most specific one, overriding all the others, is the command-line options. They affect, obviously, only the current Git command.
Important note
One issue to note is that some command-line options, for example, --no-pager
or --no-replace-objects
, go...