Keep one GitHub account for your entire career. Don't let companies talk you into creating throwaway accounts.
I've seen developers do this multiple times: join a new org, get told to create a fresh GitHub account "for security" or "for compliance," and just... go along with it. Three jobs later they have three dead accounts and their real profile looks like they started coding last year. All those green squares, gone.
GitHub's Terms of Service actually require one account per person. Section B.3: "One person or legal entity may maintain no more than one free Account." Machine/bot accounts are a separate thing, but for humans, one account.
And the green squares matter. I know they shouldn't be how we judge developers, but recruiters look at them, open source maintainers check your profile, future teammates glance at it when you're interviewing. You don't want that resetting every time you switch jobs.
"But my company wants a separate account"
GitHub already solved access control with organizations. One personal account can belong to unlimited orgs. You add your work email for commits and notifications. Org owners control repo access. When you leave, they remove you from the org. Your green squares stay. That's the whole setup.
If the security team is worried about a personal account getting compromised, GitHub supports SAML SSO for organizations. Even with personal accounts, the company can require SSO authentication before anyone accesses org resources. That's an extra layer of protection on top of whatever the developer has on their own account.
And here's the thing companies don't seem to realize: even if you create georgeguimaraes-acme for them, that account is still yours. You can add any secondary email to it, rename it to whatever you want, change the password. The company has zero control over it. They're not gaining any security by asking you to create a separate account. They're just making you fragment your history for nothing.
Setting it up
Add your work email to your GitHub account under Settings > Emails, then configure git per-repo:
cd ~/work/company-repo
git config user.email "[email protected]"GitHub links both emails to your profile. You wouldn't create a brand-new LinkedIn every time you change jobs. Same thing here.
Keeping the green squares after you leave
When you leave a company and lose org access, your contributions to their private repos can disappear from your graph. Poof.
Star every repo you contribute to. Every time you open a PR or push a commit to a new repo, star it. GitHub used to document this explicitly as a way to retain contributions after leaving an org. They've since removed it from the docs, but it still works. Starring is just a bookmark, no code is copied, no NDA concern.
Also add your work email to your GitHub account under Settings > Emails. You don't even need to verify it. Just having it there is enough for GitHub to link those commits to your profile.
Do this from day one, not on your last day.
One exception: if your company uses Enterprise Managed Users, those accounts are genuinely company-owned. The company's IdP controls provisioning, authentication, and access. Managed accounts can't contribute outside the enterprise. In that case, you'll have both: a managed account for work and your personal account for everything else. That's fine. The point is your personal account should be the one that follows you across jobs.
One profile. Your whole career. Keep it green.