什么设置影响Git中的用户名? [英] What settings affect user name in Git?
本文介绍了什么设置影响Git中的用户名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的git配置中更改用户名,但是当我想更改用户名或电子邮件时(在 .gitconfig
文件中),它会恢复到前一个。我也尝试通过 git config --global user.name< user-name>
来做到这一点,但它也恢复了原状。
我应该在哪里看?在Git中调整用户名的(其他)方法是什么?
解决方案> git config user。名称< user-name >
优先我相信,您可以在您的存储库中找到
优先我相信,您可以在您的存储库中找到
$ REPO_DIR / .git / config
I wanted to change the user name in my git configurations, but when I think I change the user name or email (in .gitconfig
file) it restores back to the previous one. I have also tried doing it through git config --global user.name <user-name>
but it "restores" back as well.
Where else should I look? What are the (other) ways to tune my user name in Git?
解决方案
git config user.name <user-name
>
takes precedence i believe, you can find the information in your repository $REPO_DIR/.git/config
这篇关于什么设置影响Git中的用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文