单独修改 Git 已经提交记录中的作者和提交人 信息和提交时间

修改提交人

git rebase -i --root
点击键盘 i 键, 进入编辑模式
把想要修改的节点 的 pick 改成 edit
esc 退出编辑模式
:wq  保存退出
git commit --amend --author="liufei " --no-edit
git rebase --continue
一直到 successfully

修改提交时间

git rebase -i --root
点击键盘 i 键, 进入编辑模式
把想要修改的节点 的 pick 改成 edit
esc 退出编辑模式
:wq  保存退出
GIT_COMMITTER_DATE="2022-07-14T19:31:03" git commit --amend --date="2022-07-14T19:31:03" --no-edit
git rebase --continue
一直到 successfully

时间格式:
2022年7月21日 GMT+8 上午11:03:06  ==> 2022-07-21T11:03:06
2022年7月21日 GMT+8 下午2:03:06  ==> 2022-07-21T14:03:06

你可能感兴趣的:(单独修改 Git 已经提交记录中的作者和提交人 信息和提交时间)