git config <setting> <value>

Change Git configuration

Arguments

NameDescription
setting
value

Options

NameDescription
--local <arg...>Default: write to the repository .git/config file
--globalFor writing options: write to global ~/.gitconfig file rather than the repository .git/config
--replace-allDefault behavior is to replace at most one line. This replaces all lines matc
--addAdds a new line to the option without altering any existing values. This is t
--getGet the value for a given key (optionally filtered by a regex matching the va
--get-allLike get, but returns all values for a multi-valued key
--get-regexp <regexp>Like --get-all, but interprets the name as a regular expression and writes ou
--get-urlmatch <name> <url>When given a two-part name section.key, the value for section..key whose part
--systemFor writing options: write to system-wide $(prefix)/etc/gitconfig rather than
--worktreeSimilar to --local except that.git/config.worktree is read from or written to
-f, --file <config-file>Use the given config file instead of the one specified by GIT_CONFIG
--blob <blob>Similar to --file but use the given blob instead of a file. E.g. you can use
--remove-sectionRemove the given section from the configuration file
--rename-sectionRename the given section to a new name
--unsetRemove the line matching the key from config file
--unset-allRemove all lines matching the key from config file
-l, --listList all variables set in config file, along with their values
--fixed-valueWhen used with the value-pattern argument, treat value-pattern as an exact st
--type <type>Git config will ensure that any input or output is valid under the given type
--no-typeUn-sets the previously set type specifier (if one was previously set). This o
-z, --nullFor all options that output values and/or keys, always end values with the nu
--name-onlyOutput only the names of config variables for --list or --get-regexp
--show-originAugment the output of all queried config options with the origin type (file
--show-scopeSimilar to --show-origin in that it augments the output of all queried config
--get-colorbool <name>Find the color setting for name (e.g. color.diff) and output "true" or "false
--get-color <name> [default]Find the color configured for name (e.g. color.diff.new) and output it as the
-e, --editOpens an editor to modify the specified config file; either --system, --globa
--includesRespect include.* directives in config files when looking up values. Defaults
--no-includesRespect include.* directives in config files when looking up values. Defaults
--default [value]When using --get, and the requested variable is not found, behave as if were