git provides a git config tool to configure or read the appropriate work environment variables. How to read these configuration information. When reading system-level configuration information, why does it appear
fatal:unable to read config file ' D:\Program files\git\mingw64/etc/gitconfig ':
No such file or directory ...
git has three configuration files:
1. The repository-level configuration file (. git/config) configuration is only valid for the current project; If you use Git config with the--local option, this file is read and written. 2. The profile of the global profile (~/.gitconfig) User directory applies only to that user, and if you use Git config with the--global option, this file is read and written. 3. A configuration that is universally applicable to all users in the system-level configuration file (/etc/gitconfig) system, which is read and written with the--system option when using git config.
Note----Priority
Repository-Level Profiles > Global Profiles > System-Level profiles Therefore, each level of configuration overrides the same configuration on the upper layer.
To view a configuration file with the git config command
Command parameter –list, shorthand-l format: git config [–local|–global|–system]-L View repository-level config----------command: git config--local-l view global-level config-- ----------command: Git config--global-l view system-level config------------command: git config--system-l (System-level configuration file not found) To view the currently active Configuration----------command: Git config-l, this time displays the final three configuration file after the calculation of the configuration information
Version Library level profile information:
Global-level configuration file information:
System-level profile information (file not found):
To view the etc file in the installation directory, there is no config file in the file config
After the actual installation, the configuration file is separate in the C-drive/programdata/git file
Enter the C/programdata/git to view
view currently in effect configuration