Git配置位于H:驱动器中

时间:2016-11-25 15:23:45

标签: git config

我有Windows 7 32 bit并且最近正在寻找我的.gitconfig文件,并试图对我的公司代理脚本进行反向工程,以便我可以利用它来克服我的优势并克隆存储库等。然而,在我的挖掘过程中,我发现我在多个位置有多个.gitconfig文件,似乎当我写入配置文件中的代理然后运行git config --list --show-origin时,我得到以下输出而不是在任何回购中,并在我的桌面上:

file:"C:\\ProgramData/Git/config"       core.symlinks=false
file:"C:\\ProgramData/Git/config"       core.autocrlf=true
file:"C:\\ProgramData/Git/config"       core.fscache=true
file:"C:\\ProgramData/Git/config"       color.diff=auto
file:"C:\\ProgramData/Git/config"       color.status=auto
file:"C:\\ProgramData/Git/config"       color.branch=auto
file:"C:\\ProgramData/Git/config"       color.interactive=true
file:"C:\\ProgramData/Git/config"       help.format=html
file:"C:\\ProgramData/Git/config"       http.sslcainfo=C:/Users/me/AppData/Local/Programs/Git/mingw64/ssl/certs/my-cert.crt
file:"C:\\ProgramData/Git/config"       diff.astextplain.textconv=astextplain
file:"C:\\ProgramData/Git/config"       rebase.autosquash=true
file:"C:\\Users\\me\\AppData\\Local\\Programs\\Git\\mingw64/etc/gitconfig"        credential.helper=manager
file:H://.gitconfig     user.name=me
file:H://.gitconfig     user.email=my email
file:H://.gitconfig     url.https://.insteadof=git://
file:H://.gitconfig     url.https://github.com.insteadof=git://github.com

假设我想将代理脚本写入我的git config:

set HTTP_PROXY=http://domain.com:80
git config --global http.proxy %HTTP_PROXY%

然后再次显示配置文件:

file:"C:\\ProgramData/Git/config"       core.symlinks=false
file:"C:\\ProgramData/Git/config"       core.autocrlf=true
file:"C:\\ProgramData/Git/config"       core.fscache=true
file:"C:\\ProgramData/Git/config"       color.diff=auto
file:"C:\\ProgramData/Git/config"       color.status=auto
file:"C:\\ProgramData/Git/config"       color.branch=auto
file:"C:\\ProgramData/Git/config"       color.interactive=true
file:"C:\\ProgramData/Git/config"       help.format=html
file:"C:\\ProgramData/Git/config"       http.sslcainfo=C:/Users/me/AppData/Local/Programs/Git/mingw64/ssl/certs/my-cert.crt
file:"C:\\ProgramData/Git/config"       diff.astextplain.textconv=astextplain
file:"C:\\ProgramData/Git/config"       rebase.autosquash=true
file:"C:\\Users\\me\\AppData\\Local\\Programs\\Git\\mingw64/etc/gitconfig"        credential.helper=manager
file:H://.gitconfig     user.name=me
file:H://.gitconfig     user.email=my email
file:H://.gitconfig     url.https://.insteadof=git://
file:H://.gitconfig     url.https://github.com.insteadof=git://github.com
file:H://.gitconfig     http.proxy=%HTTP_PROXY%

它将它写入H:驱动器,这是git的正常行为吗?如果没有,我该如何解决这个问题呢?它会把它写到正确的位置?

为了说清楚,我确实在我的H:驱动器中有一个git repo,它们没有链接到github,只是通过共享驱动器从任何人都可以获取的回购

0 个答案:

没有答案