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:27] – [SYNOPSIS] rpjday | git_config [2019/02/18 09:57] (current) – [Configuration sections and keys] rpjday | ||
|---|---|---|---|
| Line 37: | Line 37: | ||
| ===== Basic configuration examples ===== | ===== Basic configuration examples ===== | ||
| + | |||
| + | Configuration settings of the form ''< | ||
| < | < | ||
| Line 56: | Line 58: | ||
| </ | </ | ||
| - | ===== Configuration sections and keys ===== | + | All of the above (based on specifying '' |
| - | Format of '' | + | <code> |
| + | [user] | ||
| + | email = rpjday@crashcourse.ca | ||
| + | name = Robert P. J. Day | ||
| + | [color] | ||
| + | ui = false | ||
| + | </code> | ||
| - | * '' | + | and so on. |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | Format of '' | + | To delete a configuration setting, add '' |
| - | * '' | + | < |
| - | * '' | + | $ git config --global --unset alias.br |
| + | </ | ||
| - | Sections and keys are //not// case-sensitive, | + | ===== Three levels of configuration ===== |
| - | * '' | + | In order of processing (later settings override earlier ones): |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | ===== Three levels of configuration ===== | + | * system (''/ |
| + | * global ('' | ||
| + | * local ('' | ||
| ==== / | ==== / | ||
| Line 92: | Line 96: | ||
| ==== ~/ | ==== ~/ | ||
| - | Per-user | + | Per-user: |
| < | < | ||
| Line 132: | 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 201: | 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 227: | 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, | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||