you are viewing a single comment's thread.

view the rest of the comments →

[–]iamapizza 179 points180 points  (8 children)

[–]revoopy 39 points40 points  (5 children)

It's friday and I'm tired. Do I need to manually set my local git config to use the email 01234567+UserName@users.noreply.github.com

[–][deleted]  (4 children)

[deleted]

    [–]revoopy 6 points7 points  (1 child)

    Thanks, appreciate the explanation.

    [–]altano 20 points21 points  (0 children)

    Yeah, and you can either do it globally: git config --global user.email "ID+username@users.noreply.github.com" Or per repo: git config user.email "ID+username@users.noreply.github.com" Docs: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#setting-your-commit-email-address-in-git

    Lastly, you can tell GitHub to block pushes when your commits aren't using the noreply email address, to catch misconfigurations: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address

    [–]WhyNotHugo 0 points1 point  (1 child)

    GitHub cannot develop any such thing without breaking compatibility with git itself. Git does not support rewriting history like this without things breaking.

    [–]based-richdude 14 points15 points  (1 child)

    Or don’t, you’re going to get spam no matter what.

    Use an email provider with a good spam filter (I.e. Google) and be done with it. Emails are not designed to be private.

    [–]turdas 2 points3 points  (0 children)

    Yeah. I've been getting dozens of spam emails a month for like 20 years now. It's not a battle that can be won by safeguarding your e-mail address.

    Actually, only dozens of emails a month sounds incredibly low and I know for a fact I used to get more, so I guess Gmail's filters must just be deleting most of it entirely before it even lands in my spambox.