This command allows get and set repository or global options.
You can query/set/replace/unset options with this command. The name is actually the section and the key separated by a dot, and the value will be escaped.
Multiple lines can be added to an option by using the --add option. If you want to update or unset an option which can occur on multiple lines, a POSIX regexp value_regex needs to be given. Only the existing values that match the regexp are updated or unset. If you want to handle the lines that do not match the regex, just prepend a single exclamation mark in front (see also [EXAMPLES]).
The type specifier can be either --int or --bool, to make git config ensure that the variable(s) are of the given type and convert the value to the canonical form (simple decimal number for int, a "true" or "false" string for bool), or --path, which does some path expansion (see --path below). If no type specifier is passed, no checks or transformations are performed on the value.
When reading, the values are read from the system, global and repository local configuration files by default, and options --system, --global, --local and --file can be used to tell the command to read from only that location (see [FILES]).
When writing, the new value is written to the repository local configuration file by default, and options --system, --global, --file can be used to tell the command to write to that location (you can say --local but that is the default).
This command will fail with non-zero status upon error. Some exit codes are:
The config file is invalid (ret=3),
Can not write to the config file (ret=4),
No section or name was provided (ret=2),
The section or key is invalid (ret=1),
You try to unset an option which does not exist (ret=5),
You try to unset/set an option for which multiple lines match (ret=5), or
You try to use an invalid regexp (ret=6).
On success, the command returns the exit code 0.
This command allows get and set repository or global options.