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:39] – [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 (based on specifying '' | + | All of the above (based on specifying '' |
| < | < | ||
| Line 70: | Line 70: | ||
| and so on. | and so on. | ||
| - | To delete a configuration setting, add '' | + | To delete a configuration setting, add '' |
| < | < | ||
| Line 83: | Line 83: | ||
| * global ('' | * global ('' | ||
| * local ('' | * local ('' | ||
| - | |||
| - | |||
| - | |||
| - | ===== Three levels of configuration ===== | ||
| ==== / | ==== / | ||
| Line 100: | Line 96: | ||
| ==== ~/ | ==== ~/ | ||
| - | Per-user | + | Per-user: |
| < | < | ||
| Line 140: | 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 209: | 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 236: | Line 210: | ||
| </ | </ | ||
| - | ===== Configuration sections | + | ==== 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 | ||
| Format of ''< | Format of ''< | ||