6 git-config-set - Set options in .git/config.
11 'git-config-set' ( name [value [value_regex]] | --unset name [value_regex] )
15 You can set/replace/unset options with this command. The name is actually
16 the section and the key separated by a dot, and the value will be escaped.
18 If you want to set/unset an option which can occor on multiple lines, you
19 should provide a POSIX regex for the value.
21 This command will fail if
23 . .git/config is invalid,
24 . .git/config can not be written to,
25 . no section was provided,
26 . the section or key is invalid,
27 . you try to unset an option which does not exist, or
28 . you try to unset/set an option for which multiple lines match.
35 Remove the given option from .git/config
41 Given a .git/config like this:
44 # This is the config file, and
45 # a '#' or ';' character indicates
51 ; Don't trust file modes
56 external = "/usr/local/bin/gnu-diff -u"
61 command="ssh" for "ssh://kernel.org/"
62 command="proxy-command" for kernel.org
63 command="myprotocol-command" for "my://"
65 you can set the filemode to true with
68 % git config-set core.filemode true
71 The hypothetic proxy command entries actually have a postfix to discern
72 to what URL they apply. Here is how to change the entry for kernel.org
76 % git config-set proxy.command '"ssh" for kernel.org' 'for kernel.org$'
79 This makes sure that only the key/value pair for kernel.org is replaced.
81 To delete the entry for renames, do
84 % git config-set --unset diff.renames
90 % git config-set diff.renames
93 If you want to delete an entry for a multivar (like proxy.command above),
94 you have to provide a regex matching the value of exactly one line.
99 Written by Johannes Schindelin <Johannes.Schindelin@gmx.de>
103 Documentation by Johannes Schindelin.
107 Part of the gitlink:git[7] suite