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:30] – [Basic configuration examples] rpjday | git_config [2019/02/18 09:57] (current) – [Configuration sections and keys] rpjday | ||
|---|---|---|---|
| Line 58: | Line 58: | ||
| </ | </ | ||
| - | All of the above end up in your (INI-style) personal '' | + | All of the above (based on specifying '' |
| < | < | ||
| Line 69: | Line 69: | ||
| and so on. | and so on. | ||
| - | ===== Configuration sections and keys ===== | ||
| - | Format of '' | + | To delete a configuration setting, add '' |
| - | * '' | + | < |
| - | * '' | + | $ git config --global --unset alias.br |
| - | * '' | + | </ |
| - | * '' | + | |
| - | * '' | + | |
| - | Format | + | ===== Three levels |
| - | * '' | + | In order of processing (later settings override earlier ones): |
| - | * '' | + | |
| - | Sections and keys are //not// case-sensitive, | + | * system |
| - | + | * global ('' | |
| - | * '' | + | * local ('' |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | + | ||
| - | ===== Three levels of configuration ===== | + | |
| ==== / | ==== / | ||
| Line 105: | Line 96: | ||
| ==== ~/ | ==== ~/ | ||
| - | Per-user | + | Per-user: |
| < | < | ||
| Line 145: | 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 214: | 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 240: | 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, | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||