git CMD找到.gitconfig但Windows cmd没有? [英] git CMD finds .gitconfig but Windows cmd does not?

查看:232
本文介绍了git CMD找到.gitconfig但Windows cmd没有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在git cmd下运行git config时,一切都很好。但是,当我在普通的旧Windows cmd中运行时,找不到.gitconfig。我无法更改env vars Home,Homedrive或Homepath,因为它们是由我们的公司广告团队设置的。

When I run git config under git cmd, all is well. however when I run in in plain old Windows cmd, it can't find .gitconfig. I can't changes the env vars Home, Homedrive or Homepath since those are set by our corporate ad team.

我想知道为什么git cmd可以工作,但是Windows cmd上的git无法工作,我能做什么。查看屏幕截图:

I'd like to know why git cmd works but git from windows cmd doesn't and what i can do about it. See screenshot:

屏幕截图显示了环境变量这两个外壳:

Screenshot showing env vars in both shells:

推荐答案

我猜测git bash中的主文件夹与Windows cmd提示符中的%HOMEDRIVE %% HOMEPATH%文件夹不同。回显两条路径并进行比较。

I'm guessing your home folder in the git bash is a different folders than %HOMEDRIVE%%HOMEPATH% in the Windows cmd prompt. Echo the two paths and compare them.

这篇关于git CMD找到.gitconfig但Windows cmd没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆