
Avoid committing to GitHub with your company email - kintoandar
https://github.com/kintoandar/git-hooks
======
MaulingMonkey
If you're trying to avoid making your email public via GitHub, you should also
ensure:

1) "Public email" is set to "Don't show my email address" under
[https://github.com/settings/profile](https://github.com/settings/profile)

2) "Keep my email address private" is checked under
[https://github.com/settings/emails](https://github.com/settings/emails)

It's frustrating that these are still two separate options - worse still that
I believe I had the first option set when the second was added, unchecked by
default, resulting in me leaking my email about a year ago. The spambots had
it anyways, so I guess it wasn't that big a deal... and hey, maybe they added
a warning someplace like I suggested?

------
orionblastar
It depends on the company. For example Google supports free and open source
projects and might like that you contribute to some of them and see if any of
them fit their business plan.

But yeah you don't want to use company email. When I worked I used my Hotmail
account for Microsoft and other tech support and programming websites, so my
company email wouldn't get spammed.

------
milas
You can already configure the author name/email per repo with `git config`[0].
It seems that the intent of this script is to simply to remind you if you
forget to do that.

(Perhaps that's obvious -- I actually assumed initially that it was going to
rewrite the index before pushing which would be terrifying.)

[0] [https://help.github.com/articles/setting-your-email-in-
git/#...](https://help.github.com/articles/setting-your-email-in-git/#setting-
your-email-address-for-a-single-repository)

------
kintoandar
Yeah, you guys are right, the `README` file is not clear enough regarding the
objective of the hook. Will fix that ASAP.

Bottom line, this is a "save your bacon" approach if you forget to change your
email locally on a github repo, but still want to use your professional email
globally on your system.

We've created this hook after we had to, yet again, rewrite history to remove
the company email from public commits.

------
0x54MUR41
What use case that we should avoid committing to GitHub with our company
email?

~~~
kintoandar
Keeping your personal projects personal and avoiding publishing your corporate
email address on the web (security and spam related concerns, for example).

~~~
0x54MUR41
Oh, I see. Thanks @kintoandar.

~~~
kintoandar
Glad to help.

Have fun ;)

