git修改提交commits的作者名字(Autor name)

网友投稿 3026 2022-08-23 08:10:03

git修改提交commits的作者名字(Autor name)

我在别人的容器里面提交代码,结果用了别人的git name和email,结果commits的名字变成了别人的名字。

解决方法

git config user.name "New User"git config user.email "newuser@gmail.com"git loggit rebase -i 选择你要修改commits的前一个commit把pick变成e,保存退出git commit --amend --reset-author --no-editgit rebase --continuegit push --force-with-lease

参考文献

[1].How to change the commit author for one specific commit?https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:mac homebrew Failed to connect to raw.githubusercontent.com port 443: Connection refused
下一篇:2021年的触底反弹
相关文章