在svn到git的迁移过程中,提交作者的邮箱地址错误



我已将svn的repo迁移到本地git。由于某些原因,所有作者看起来都像:

userid <userid@localhost> 

是否有办法改变所有作者重写"localhost""myorg.org"

userid <userid@myorg.org> 

userid不固定

注释中有一些在导入过程中修复此问题的建议。如果您想在导入完成后修复,可以使用git filter-branch命令重写作者邮件。

git filter-branch --env-filter '
  GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL/localhost/myorg.org}
  GIT_COMMITTER_EMAIL=${GIT_COMMITTER_EMAIL/localhost/myorg.org}
'

这将在所有作者和提交者的电子邮件中(在当前分支上)用myorg.org代替localhost

最新更新