我目前正在将svn存储库转换为git存储库.当我手动进行时,我会定期更改user.name和user.email以设置提交的作者.一切似乎工作正常,但现在我必须从没有电子邮件地址的用户提交一些东西.我从.gitconfig文件中删除了电子邮件属性并尝试了,但随后在git log中显示了电子邮件字段user_login@user_login.(none).是否可以设置不发送电子邮件并阻止git猜测?
有没有办法全局配置git不自动生成用户的电子邮件,如果没有设置并中止提交?
$ git commit -m "test"
[master (root-commit) 71c3e2e] test
Committer: unknown <my.user@my.very.own.hostname>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
Run Code Online (Sandbox Code Playgroud)
如果提交者不够仔细检查git警告,这可能会导致严重的隐私泄露.