Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the priority regarding git configuration? [duplicate]

Tags:

git

git-config

If I set configuration on my ~/.gitconfig file, which config would override it?

  • project level config : .git/config
  • system level config : /etc/gitconfig
like image 289
djangofan Avatar asked Nov 09 '14 02:11

djangofan


People also ask

What are the three levels of git configuration?

# There are 3 levels of git config; project, global and system.

What is configuration in git?

The git config command is a convenience function that is used to set Git configuration values on a global or local project level. These configuration levels correspond to . gitconfig text files. Executing git config will modify a configuration text file.

What is the correct command to check all configurations in git?

The git config list command will show all Git config properties throughout all of the variously scoped Git files.


1 Answers

Lowest to highest priority:

  • /etc/gitconfig: system wide, edited when --system parameter is used
  • ~/.gitconfig: user specific configuration, edited when --global parameter is used
  • .git/config: repository specific configuration
like image 120
Michael Kohl Avatar answered Oct 03 '22 12:10

Michael Kohl