修复git提交中的作者信息
fix-author的Python项目详细描述
修复作者
有时,提交者的历史信息可能因错误而丢失。
例如,有人可能错误地配置了他的电子邮件,或者他可能只是没有配置相关的 因此,他的承诺根本无法记录在他的github主页上,而他对 错误配置的项目将被忽略。
要高效方便地解决此问题,可以使用fix author。
安装
pip install fix-author
用法
λ fix-author.exe --help
Available commands:
fix
fu: from user/author name to change.
tu: to user/name to be changed to.
fe: from email/email to change.
tu: to email/email to be changed to.
下面是四个示例:
- 更改特定用户的电子邮件
例如:将thautwarm
的电子邮件更改为123@q3.com
fix-author fix -fu thautwarm -te 123@q3.com
- 更改特定电子邮件的用户名
fix-author fix -fe <specific email> -tu "<expected username>"
- 当电子邮件和日期为用户名时更改电子邮件
fix-author fix -fe <specific email> -fu <dated username> -tu <expected email>
小心:执行重构后,
您应该使用git push --force
覆盖该回购的历史记录。