美文网首页
git修改author

git修改author

作者: 温暖的纯真 | 来源:发表于2019-03-01 15:27 被阅读0次
  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

相关文章

网友评论

      本文标题:git修改author

      本文链接:https://www.haomeiwen.com/subject/nbyduqtx.html