git修改author

  1. 查看日志
$ git log

commit 5729334d4295a170536a4cbbf9a73c274b3cfa4d
Author: username <test@qq.com>
Date:   Fri Mar 1 14:14:07 2019 +0800

要修改用户username 和 邮箱test@qq.com
配置 user.name和user.email

$ git config user.name 'username1'
$ git config user.email test1@qq.com

修改最后一次author

 git commit -amend --reset-author

修改以前的

$ git rebase -i HEAD~3
==编辑
edit 5729334 gitignore //pick改成edit
pick 30e9963 test
pick d87e0e9 更新 .gitignore
==提示
Stopped at 5729334...  gitignore
You can amend the commit now, with
 $ git commit --amend
Once you are satisfied with your changes, run
$ git rebase --continue
==重置
$ git commit --amend --reset-author
==重置结束
$ git rebase --continue
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容