X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=Documentation%2Fgit-config-set.txt;h=bfbd42147ae9bfef01e9320340336a9ed8794aee;hb=f98d863d2122e1b8781dfb9889df98876a26f315;hp=c707fbcf99dd385112f910c235738dac42bd679d;hpb=a6322d079b1d2e2cb72da1271171b35a173f3d22;p=git.git diff --git a/Documentation/git-config-set.txt b/Documentation/git-config-set.txt index c707fbcf..bfbd4214 100644 --- a/Documentation/git-config-set.txt +++ b/Documentation/git-config-set.txt @@ -22,7 +22,9 @@ actually the section and the key separated by a dot, and the value will be escaped. If you want to set/unset an option which can occor on multiple lines, you -should provide a POSIX regex for the value. +should provide a POSIX regex for the value. If you want to handle the lines +*not* matching the regex, just prepend a single exlamation mark in front +(see EXAMPLES). This command will fail if @@ -82,6 +84,7 @@ Given a .git/config like this: command="ssh" for "ssh://kernel.org/" command="proxy-command" for kernel.org command="myprotocol-command" for "my://" + command=default-proxy ; for all the rest you can set the filemode to true with @@ -139,6 +142,19 @@ new one with % git config-set --replace-all proxy.command ssh ------------ +However, if you really only want to replace the line for the default proxy, +i.e. the one without a "for ..." postfix, do something like this: + +------------ +% git config-set proxy.command ssh '! for ' +------------ + +To actually match only values with an exclamation mark, you have to + +------------ +% git config-set section.key value '[!]' +------------ + Author ------