github.com/1800alex/go-git-cmd-wrapper/v2@v2.2.5/config/doc.go (about)

     1  /*
     2  Package config git-config - Get and set repository or global options.
     3  
     4  SYNOPSIS
     5  
     6  Reference: https://git-scm.com/docs/git-config
     7  
     8  		git config [<file-option>] [type] [--show-origin] [-z|--null] name [value [value_regex]]
     9  		git config [<file-option>] [type] --add name value
    10  		git config [<file-option>] [type] --replace-all name value [value_regex]
    11  		git config [<file-option>] [type] [--show-origin] [-z|--null] --get name [value_regex]
    12  		git config [<file-option>] [type] [--show-origin] [-z|--null] --get-all name [value_regex]
    13  		git config [<file-option>] [type] [--show-origin] [-z|--null] [--name-only] --get-regexp name_regex [value_regex]
    14  		git config [<file-option>] [type] [-z|--null] --get-urlmatch name URL
    15  		git config [<file-option>] --unset name [value_regex]
    16  		git config [<file-option>] --unset-all name [value_regex]
    17  		git config [<file-option>] --rename-section old_name new_name
    18  		git config [<file-option>] --remove-section name
    19  		git config [<file-option>] [--show-origin] [-z|--null] [--name-only] -l | --list
    20  		git config [<file-option>] --get-color name [default]
    21  		git config [<file-option>] --get-colorbool name [stdout-is-tty]
    22  		git config [<file-option>] -e | --edit
    23  
    24  DESCRIPTION
    25  
    26  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.
    27  
    28  Multiple lines can be added to an option by using the --add option.
    29  If you want to update or unset an option which can occur on multiple lines, a POSIX regexp value_regex needs to be given.
    30  Only the existing values that match the regexp are updated or unset.
    31  If you want to handle the lines that do not match the regex, just prepend a single exclamation mark in front (see also the section called “EXAMPLES”).
    32  
    33  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).
    34  If no type specifier is passed, no checks or transformations are performed on the value.
    35  
    36  When reading, the values are read from the system, global and repository local configuration files by default, and options --system, --global, --local and --file <filename> can be used to tell the command to read from only that location (see the section called “FILES”).
    37  
    38  When writing, the new value is written to the repository local configuration file by default, and options --system, --global, --file <filename> can be used to tell the command to write to that location (you can say --local but that is the default).
    39  
    40  This command will fail with non-zero status upon error. Some exit codes are:
    41  
    42  - The section or key is invalid (ret=1),
    43  - no section or name was provided (ret=2),
    44  - the config file is invalid (ret=3),
    45  - the config file cannot be written (ret=4),
    46  - you try to unset an option which does not exist (ret=5),
    47  - you try to unset/set an option for which multiple lines match (ret=5), or
    48  - you try to use an invalid regexp (ret=6).
    49  
    50  On success, the command returns the exit code 0.
    51  
    52  */
    53  package config