在 Visual Studio 中更改 Git 作者信息
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43049183/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Change Git Author Information in Visual Studio
提问by Mohammed
I have a team project in Visual Studio Team Services and I'm using git as a version control system.
我在 Visual Studio Team Services 中有一个团队项目,我使用 git 作为版本控制系统。
Is it possible to change the author name and email of the commits in Visual Studio website ?
是否可以更改 Visual Studio 网站中提交的作者姓名和电子邮件?
回答by ginomessmer
Your author name and email address is bound to your commits and mostly taken from your global Git settings, not your VSTS account. Change your display info through Team Explorer > Settings > Repository Settings
.
您的作者姓名和电子邮件地址与您的提交绑定,并且主要取自您的全局 Git 设置,而不是您的 VSTS 帐户。通过 更改您的显示信息Team Explorer > Settings > Repository Settings
。
In case you want to change it through Git shell:
如果您想通过 Git shell 更改它:
To set your username for a specific repository, enter the following command in the root folder of your repository:
要为特定存储库设置用户名,请在存储库的根文件夹中输入以下命令:
git config user.name "Billy Everyteen"
# Set a new name
git config user.name
# Verify the setting
Billy Everyteen
EDIT:Just noticed you're talking about existing commits, take a look at Change commit author at one specific commit.
编辑:刚刚注意到您在谈论现有提交,请查看Change commit author at one specific commit。