[Feature request] Allow conditionally setting the "Block command line pushes that expose my email" only for some e-mail addresses #159691
Replies: 2 comments
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Hi @abjugard , Thanks for raising this — it's a very valid use case and something that resonates with many developers working across both personal and professional GitHub environments. The “Block command line pushes that expose my email” feature is indeed a great safeguard, especially when using a private GitHub email to keep your personal information secure. However, as you've pointed out, this becomes a bit restrictive when working in a professional context where your work email is intentionally used and necessary for compliance, auditing, or internal tooling. While your current setup using conditional includes in ~/.gitconfig is a solid approach to separating identities, unfortunately GitHub currently applies the email protection rule universally. This means that even correctly configured work emails will trigger the protection mechanism if they are not explicitly made public in your GitHub email settings. It would be ideal if GitHub allowed more granular control, such as the ability to:
For now, the only workaround is to add your work email to your GitHub account and mark it as "public" if you want to use it in commits without hitting this restriction — though I fully understand why that may not be ideal or even acceptable depending on your employer’s privacy policies. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
The "Block command line pushes that expose my email" feature is great, and helps immensely in allowing me to keep my private email private. But when I make commits to repos on my current employers GitHub organisation I need to commit using my work email. It is easy to handle setting the correct work email for those repos via
~/.gitconfig
:~/.gitconfig-work
:But then when I push in that repo I get:
I would like a way to individually disable that rule for specific email addresses (or GitHub organisations).
Beta Was this translation helpful? Give feedback.
All reactions