Git view profile--such as fatal:unable to read config file

Source: Internet
Author: User
Tags using git

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




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.