Difference between revisions of "Git/config"
< Git
Jump to navigation
Jump to search
(extracted from parent page) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==About== | ||
+ | '''git config''' lets you set parameters for the current repository or globally. | ||
==Syntax== | ==Syntax== | ||
* '''git config {{arg|param_name}}''' lists the current value for the given parameter | * '''git config {{arg|param_name}}''' lists the current value for the given parameter | ||
Line 4: | Line 6: | ||
** '''param_name''': user.name, user.email, core.editor | ** '''param_name''': user.name, user.email, core.editor | ||
* '''git config --list''' lists current configuration parameters | * '''git config --list''' lists current configuration parameters | ||
+ | ==Example== | ||
+ | * <code>git config --global core.editor nano</code> tells git to use the {{l/linux/cmd|nano}} editor for commits | ||
+ | ==Links== | ||
+ | ===Reference=== | ||
+ | * [https://git-scm.com/docs/git-config git-config] | ||
+ | * [https://git-scm.com/book/en/v1/Getting-Started-First-Time-Git-Setup .5 Getting Started - First-Time Git Setup] |
Latest revision as of 21:58, 10 October 2019
About
git config lets you set parameters for the current repository or globally.
Syntax
- git config <param_name> lists the current value for the given parameter
- git config --global <param_name> <param_value>
- param_name: user.name, user.email, core.editor
- git config --list lists current configuration parameters
Example
git config --global core.editor nano
tells git to use the nano editor for commits