系统设置:MacOS Catalina 10.15.6
> git --version
git version 2.24.3 (Apple Git-128)
file: ~/.gitconfig
:
[user]
name = nickname
email = [email protected] /cdn-cgi/l/email-protection
[includeIf "gitdir:~/Business"]
path = ~/.gitconfig-work
file: ~/.gitconfig-work
:
[user]
name = First Last
email = [email protected] /cdn-cgi/l/email-protection
尝试检查终端配置时的输出:
(base) MBP-Name:~ myname$ cd ~/Business/
(base) MBP-Name:Business myname$ git config --get user.name
nickname
我已经尝试过两个亲戚~
和绝对的/
路径要么gitdir
and path
在配置文件中。每次更改时我都会重新启动 bash。另外,我还阅读了其他几个 stackoverflow 问题,但没有成功。其中一些建议添加i
不区分大小写的选项,但它没有解决问题。
有任何想法吗 ?
我尝试删除双引号并重新输入。奇怪的是它起作用了。因为我复制了文本https://blog.gitguardian.com/8-easy-steps-to-set-up-multiple-git-accounts/ https://blog.gitguardian.com/8-easy-steps-to-set-up-multiple-git-accounts/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)