As a developer who treats their GitHub profile like a digital trophy case, I woke up today to a nightmare: over 1,000 contributions had vanished from my activity graph. One minute I was ready to start a productive day; the next, I was staring at a sea of gray squares where my hard work used to be. My first thought? WTF.
After diving into the docs and forums, I realized I’m not alone. Many developers lose their "proof of work" simply because they didn't follow the right offboarding steps. If you're a software engineer, you know your GitHub profile is often your real-world resume. You need to protect that history before you lose access to an organization, as seen in this long-standing community discussion.
A quick update on my situation: Thank God, after I reached out to my former manager Eng. Mohamed Ali, he was kind enough to add me back to the organization as a Viewer. This temporary access gave me the window I needed to fix my settings and recover my data. However, not everyone has this luxury—most of the time, once you're out, you're out.
The Golden Rule: Start Right
The best way to leave an organization safely is to start correctly. When you join a new company, don't just use your personal email for everything. Instead:
- Use the company-provided email for all work-related commits.
- Add that email to your personal GitHub account immediately.
- Keep them linked. By having both your personal and work emails tied to one GitHub identity, you ensure that every line of code you write is attributed to you.
What defines a GitHub Contribution?
In short: Commits. Your contribution graph is a visual representation of every time you’ve committed code to a repository.
Every commit contains a timestamp and metadata. GitHub uses this data to populate your graph, but there is one catch: Commits are linked to an email address, not just a username. You can see this raw data by adding the .patch extension to any commit URL. If the email address in that metadata isn't currently associated with your GitHub account, those contributions will disappear the moment you leave the organization.
How to Safely Leave an Organization
To ensure your history stays with you, follow these steps before you lose access:
- Audit your Emails: Ensure your personal email address is verified and set as your "Primary."
- The "Unverify" Trick: Delete your company email from your settings and then re-add it. Do not verify it this time. This keeps the "link" to your old commits in GitHub's database without requiring you to have an active work inbox.
- Username Check: If your handle contains references to the company, change it now.
- Secure your 2FA: Ensure your Two-Factor Authentication is linked to your personal device, not a company-issued one.
Conclusion
Your contribution graph is more than just a grid of colors; it’s a timeline of your growth and professional dedication. I was lucky enough to have a manager who helped me get back in as a viewer to fix my mistake, but you should take these steps today to make sure you never have to make that phone call.
Sources
- GitHub Docs: Setting your commit email address
- GitHub Docs: Prepare for a job change
- Community Issue: GitHub Issue #1138 - Contributions lost when leaving an org