无法更改git config的user.name,立即重置 [英] Can't change git config's user.name, gets reset immediately
本文介绍了无法更改git config的user.name,立即重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我这样做:
git config --global user.name "My New Name"
它可以工作一小会儿.如果我这样做:
It works, for a short while. If I do this:
cat ~/.gitconfig
我可以在 user.name
属性中看到正确的值.
I can see the proper value in the user.name
property.
但是,一旦我打开一个新的终端窗口或执行git commit,旧名称就会被重置.
However, as soon as I open a new terminal window or do a git commit, the old name gets reset.
我正在使用ssh.有一些缓存机制吗?
I'm using ssh. Is there some cache mechanism?
(请注意,这与GitHub用户名无关,而与每次提交的作者名有关)
(Note this is not about the GitHub username, but rather about the author name for every commit)
推荐答案
我有一个覆盖全局〜/.gitconfig
的shell脚本.具体来说,这是Mathias Bynens的 dotfiles 的 .extra
文件.
I had a shell script that was overriding the global ~/.gitconfig
. Specifically, this .extra
file from Mathias Bynens' dotfiles.
这篇关于无法更改git config的user.name,立即重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文