I like to keep my work life separate from my personal life. But I use the same GitHub account for work and personal projects. By default GitHub sends all notification emails to a single primary email address. This was an issue for me because I was getting all of my work GitHub notifications sent to my personal email.
Thankfully GitHub has a feature called custom routing that can route your notification emails to different inboxes based on the organization that owns the repositories you’re working on. Before getting started, make sure each of the email addresses you’d like to use are verified.
- To set up your own custom email routes, navigate to
Settings > Notifications. Under “Default notifications email”, use the dropdown to make sure the correct email is set up as the default. Any notifications from repositories that are not owned by an organization will go to your default notifications email.
- After setting your default email, click “Custom routing”. Set up routes by clicking “Add new route”. Choose an organization, then choose the email address you’d like to use for notifications from that organization. You can create multiple routes for any number of organizations you’re a part of.
My routes look something like this:
default → personal email address
employer → employer provided email address
employer's client → employer's client provided email address
Check out GitHub’s official email routing documentation for the most up to date instructions.