2017-09-22 39 views
0

我想挤压/修改几个提交,没有任何作者信息(显示未知作者在github中)。虽然每次我尝试互动底垫或修改时,它抛出壁球/修改提交没有作者信息

Fatal: empty ident name (for <[email protected]>) not allowed 

有什么办法来解决与?

感谢

+0

在你的配置中,是否设置了user.name和user.email? – madprog

+0

何时显示该消息?当你第一次启动'git rebase -i'时,或者当它试图应用你的待办事项清单? –

+0

当它尝试应用列表时发生了。并且'user.name'和'user.email'被设置和检查。 – Erebuxy

回答

1

可以使用git filter-branch --env-filter 'export GIT_AUTHOR_NAME=Kirby' keep_this_commit..rewrite_this_branch的时间提前,以确保所有提交有一个作者。

当然,如果他们中的一些已经有了一个很好的作家值,你需要做的env-filter条件,否则在filter-branchedit底垫一步把他们回来git commit --amend --author=...