除了全局,系统和本地之外,git配置设置还有其他地方吗?

时间:2016-07-12 10:39:32

标签: git

我在git版本2.8.3.windows.1上,对于实际存储core.autocrlf设置的位置感到有点困惑。在Git Extensions中,它显示为"未设置"但是当我查询git config时,我得到以下内容:

$ cd /c             <-- i.e. not a repo

$ git config --get core.autocrlf
false

$ git config --global --get core.autocrlf
(nothing)
$ git config --system --get core.autocrlf
(nothing)

$ git config -l
core.symlinks=false
core.autocrlf=false
core.fscache=true
...

$ git config --system -l
credential.helper=manager

$ git config --global -l
core.editor="C:/Program Files (x86)/GitExtensions/GitExtensions.exe" fileeditor
core.quotepath=false
color.ui=auto
... (not here either)

$ git config --local -l
fatal: unable to read config file '.git/config': No such file or directory

.gitconfig文件也没有

$ cat ~/.gitconfig
[core]
        editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor
        quotepath = false

因此,我了解GitExt如何将其显示为&#34;未设置&#34;,但我完全不了解git config -l获取core.autocrlf的值的方式。我似乎无法摆脱它重写它:

$ git config --unset core.autocrlf
fatal: not in a git directory

$ git config --unset --global core.autocrlf

$ git config -l
core.symlinks=false
core.autocrlf=false
core.fscache=true
...

感谢。

1 个答案:

答案 0 :(得分:3)

是。从Git for Windows 2.5.0开始,有一个system-wide Windows configuration area,因此all Windows clients can interoperate

此新路径为Make sure short file name creation is enabled on the target machine. You can check to ensure that the target machine does not have short file name creation disabled by navigating to the following registry entry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem Make sure the value "NtfsDisable8dot3NameCreation" is equal to 0. This indicates that short file name creation is enabled. A value of 1 indicates that this functionality is disabled. You should change the value to 0. After modifying this value, the target machine should be rebooted before attempting to launch the setup again. Note: If the target machine should normally have short file name creation disabled, it can be disabled after the install completes by resetting "NtfsDisable8dot3NameCreation" to 1 and rebooting. To ensure that the Windows Installer Service is properly installed and configured, it is recommended that users install the file InstmsiA.exe on Windows 95/98/Me or InstmsiW.exe on Win NT systems. These files are shipped with your InstallShield product and are located in the following location: <Product Path>\Redist\Language Independent\i386 Empty all temporary folders. The specific temporary folders for a machine can be determined by accessing the DOS prompt and typing set. Note the values listed for TEMP and TMP, and delete all files in those locations. Make sure no other applications, including utilities such as virus scanners, are running in the background. Close all running applications and utilities, and launch the installation again. If this error occurs during un-installation, use the Microsoft Windows Installer CleanUp utility to uninstall the installation. Once the installation has been successfully un-installed, you can then debug the project to determine what caused the original error.

尽管名称不同,“全局”配置区域在Windows上不是全局的,但它与特定的Git for Windows安装相关联。