Git config: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 25: Line 25:


  git config -l
  git config -l
==Configure a Setting==
git config [--file|--global|--system] <''some.git.option''> <''value''>
==Remove a Setting==
git config --unset [--file|--global|--system] <''some.git.option''>

Revision as of 06:22, 25 November 2017

Internal

Overview

git config is used to manipulate entries in Git's configuration files. There are three levels of configuration files, listed below from the highest precedence to the lowest:

1. file (.git/config). This file contains repository-specific configuration and has the highest precedence. Repository-specific configuration is manipulated when git config is gets the "--file" option. This is the default.

2. global (~/.gitconfig). This file contains user-specific configuration and it is manipulated when git config gets the "--global" option.

3. system (/etc/gitconfig). This file contains system-wide configuration and can be manipulated with the "--system" option, if the user has proper permissions.

The configuration files are not replicated during git clone.

Organizatorium

git config --global http.sslVerify true|false

Configuration Operations

List the Configuration

git config -l

Configure a Setting

git config [--file|--global|--system] <some.git.option> <value>

Remove a Setting

git config --unset [--file|--global|--system] <some.git.option>