首先打开config文件:
$ git config --global --edit
GNU nano 2.5.3 File: /home/vagrant/.gitconfig
This is Git’s per-user configuration file. [user]
Please adapt and uncomment the following lines:name = Eagle
email = 492617424@qq.com
Ctrl + X保存退出后,运行
$ git commit --amend --reset-author
好了,这样就完成了!
这篇博客介绍了如何修改Git的用户配置信息,包括作者名字和电子邮件。首先需要编辑~/.gitconfig文件,设置name和email字段,然后保存退出。通过这种方式,可以更新Git提交的作者详情。
1万+

被折叠的 条评论
为什么被折叠?



