Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_config [2019/02/18 09:36] – [Three levels of configuration] rpjday | git_config [2019/02/18 09:57] (current) – [Configuration sections and keys] rpjday | ||
|---|---|---|---|
| Line 58: | Line 58: | ||
| </ | </ | ||
| - | All of the above (based on specifying '' | + | All of the above (based on specifying '' |
| < | < | ||
| Line 69: | Line 69: | ||
| and so on. | and so on. | ||
| + | |||
| + | To delete a configuration setting, add '' | ||
| + | |||
| + | < | ||
| + | $ git config --global --unset alias.br | ||
| + | </ | ||
| ===== Three levels of configuration ===== | ===== Three levels of configuration ===== | ||
| Line 77: | Line 83: | ||
| * global ('' | * global ('' | ||
| * local ('' | * local ('' | ||
| - | |||
| - | ===== Configuration sections and keys ===== | ||
| - | |||
| - | Format of ''< | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | Format of ''< | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | Sections and keys are //not// case-sensitive, | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | ===== Three levels of configuration ===== | ||
| ==== / | ==== / | ||
| Line 114: | Line 96: | ||
| ==== ~/ | ==== ~/ | ||
| - | Per-user | + | Per-user: |
| < | < | ||
| Line 154: | Line 136: | ||
| </ | </ | ||
| - | ===== Setting your configuration ===== | + | NOTE: If you don't specify which of the three levels you want, the operation defaults to '' |
| - | + | ||
| - | ==== Global configuration ==== | + | |
| - | + | ||
| - | Setting globally (in personal | + | |
| - | + | ||
| - | < | + | |
| - | $ git config | + | |
| - | $ git config --global user.email " | + | |
| - | $ git config --global color.ui false | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Local configuration ==== | + | |
| - | + | ||
| - | Setting locally (in repo' | + | |
| - | + | ||
| - | < | + | |
| - | $ git config [--local] gui.wmstate normal | + | |
| - | </ | + | |
| ===== Listing config settings ===== | ===== Listing config settings ===== | ||
| Line 223: | Line 187: | ||
| ===== Overriding configuration settings ===== | ===== Overriding configuration settings ===== | ||
| - | ==== One-time config override with -c ==== | ||
| - | < | ||
| - | $ git -c user.name=" | ||
| - | </ | ||
| ==== Environment variables ==== | ==== Environment variables ==== | ||
| - | As an example, '' | + | Most Git commands support environment variables for overriding configuration settings. |
| * '' | * '' | ||
| Line 249: | Line 209: | ||
| $ man git | $ man git | ||
| </ | </ | ||
| + | |||
| + | ==== One-time config override with -c ==== | ||
| + | |||
| + | If you need a one-time-only override of some config setting, most Git commands support the " | ||
| + | |||
| + | < | ||
| + | $ git -c user.name=" | ||
| + | </ | ||
| + | ===== Sections and subsections ===== | ||
| + | |||
| + | Format of ''< | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Format of ''< | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Sections and keys are //not// case-sensitive, | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||