Can I configure git so it does not guess user.email configuration settings?

后端 未结 5 1896
余生分开走
余生分开走 2021-02-14 14:39

On my system I don\'t have the user.email git configuration value set at the global level, on purpose. Instead, I configure it individually in each sandbox. This is

5条回答
  •  星月不相逢
    2021-02-14 15:30

    It would be very hokey and possibly break in edge cases, but you could write a system-wide post-commit hook that looks at the author of the new commit and undoes it (via git reset) if it appears to be bogus.

    Other than that, no, Git is happy to use whatever ridiculous email address it cobbles together as a default.

提交回复
热议问题