Replies: 7 comments 5 replies
-
|
The commits themselves are tied to the email address and name configured in Git when you made them, not your GitHub account. Here's how to handle this: Understanding Commit AttributionCommits on GitHub are linked to accounts through the email address in the commit metadata. If you made commits with your work email, those commits will show your work account's profile picture and username on GitHub. SolutionsOption 1: Change Commit Author Information (Recommended)You can rewrite the Git history to change the author email from your work email to your personal email. This will make the commits appear under your personal account. Warning: This rewrites history, so only do this on repositories you control or private repos. # Clone the repository
git clone <repo-url>
cd <repo-name>
# Use git filter-repo (recommended) or git filter-branch
# Install git-filter-repo first: pip install git-filter-repo
git filter-repo --email-callback '
return email.replace(b"work@company.com", b"personal@gmail.com")
'
# Or for specific author:
git filter-repo --mailmap <(echo "Personal Name <personal@gmail.com> Work Name <work@company.com>")Alternatively, using git filter-branch --env-filter '
OLD_EMAIL="work@company.com"
NEW_NAME="Your Name"
NEW_EMAIL="personal@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
fi
' --tag-name-filter cat -- --branches --tagsOption 2: Add Your Work Email to Your Personal AccountBefore deleting your work email:
This way, commits made with your work email will be attributed to your personal account. Even if the email becomes invalid later, GitHub will still associate those commits with your account. Option 3: Transfer Repository OwnershipIf these are your personal repositories hosted under a work account:
What Happens If You Delete Your Work Email?If you delete your work email from the work GitHub account:
Recommendation for Your SituationGiven your details:
This way, your contribution history is preserved on your personal profile, even after your work account is deleted. |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately, GitHub does not provide any way to transfer commits from one account to another after they’ve already been made. Commits are attributed based on the email address used at commit time and the repository they belong to. If those commits were made in private company repositories, they will only appear on your contribution graph while: the repository is accessible to you, and the commit email is verified on your account. Once you lose access to the private repos or delete the work account, those contributions will no longer be visible on your personal profile. Deleting the work email or the work GitHub account does not move the commits — they remain in the repository and are usually shown as authored by a deleted/ghost user. In short: Commits cannot be transferred between accounts Deleting the work email/account will not preserve attribution Private repo contributions generally disappear once access is lost Recommended alternatives: Rebuild similar (non-proprietary) projects on your personal GitHub to show continuous activity Clearly explain on your profile or resume that you were contributing to private company repositories during that time (this is very common and understood by recruiters) If company policy allows before leaving, add a personal email to commits and verify it on your personal GitHub — though this still won’t help once repo access is removed There’s no official or safe workaround beyond these options. |
Beta Was this translation helpful? Give feedback.
-
|
You cannot directly transfer commits from one GitHub account to another. What you can do instead: Add the work email (used in those commits) to your personal GitHub account → the commits will then show up as yours. Or cherry-pick / rebase and recommit using your personal email (this changes commit history). |
Beta Was this translation helpful? Give feedback.
-
How to transfer commits from a work GitHub account to a personal accountCommits on GitHub are not owned by accounts, they are associated with the email address used when the commit was created. Because of this, commits cannot be directly “transferred” between accounts, but they can be correctly attributed to your personal account by following one of the methods below. Option 1: Link your work email to your personal account (Recommended)If the commits were made using your work email, you can have them appear on your personal account by adding that email there. Steps:
Once verified:
✅ Safest and simplest approach Option 2: Rewrite commit history with your personal emailIf you no longer have access to the work email, you can rewrite commit history so commits use your personal email instead. Example (for a local repository):
Then force-push:
Option 3: Cherry-pick commits into a new repositoryIf you want the commits to exist under your personal account without changing history:
This creates new commits under your personal identity. Use this when:
Important notes
Summary
Goal | Best Option
-- | --
Keep original history | Add work email to personal account
No access to work email | Rewrite commit history
Portfolio / new repo | Cherry-pick commits
|
Beta Was this translation helpful? Give feedback.
-
|
You can’t transfer commits between accounts on GitHub. Commit attribution is based on the email address used in the commit, not the username. If you want those commits to show on your personal account, add and verify the old work email in your personal account settings. Once verified, GitHub will automatically attribute those commits to you. If you no longer have access to that email, the only workaround is rewriting history with a new email which is possible but risky and not recommended for shared repositories. |
Beta Was this translation helpful? Give feedback.
-
|
Hi,
Ok thanks for the tip, then Ill transfer my work email to my personal GitHub account, additionally I was just wondering because I tried to rewrite the git history on a test repository, and it looked like it worked, but when I went on my personal account it didn’t show anything on the profile does it take a certain amount of time to show or is there anything else I can do ?
Thanks for your help
On 30 Jan 2026, at 5:08 PM, Anurag Dwivedi ***@***.***> wrote:
You can’t transfer commits between accounts on GitHub. Commit attribution is based on the email address used in the commit, not the username.
If you want those commits to show on your personal account, add and verify the old work email in your personal account settings. Once verified, GitHub will automatically attribute those commits to you.
If you no longer have access to that email, the only workaround is rewriting history with a new email which is possible but risky and not recommended for shared repositories.
—
Reply to this email directly, view it on GitHub<#185811 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BV2UZYAQBYSS5EUSETJFZJT4JMNPNAVCNFSM6AAAAACTESP35KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNRUHA4DCMQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
how to transfer commits from work account to personal account (github)you can’t really “transfer commits” between github accounts. commits live in the repo history forever, and github just attributes them to an account based on the email inside the commit. how github decides who gets the commiteach commit has an
so the trick is not moving commits, it’s linking the email. best case (no history rewrite)if your work commits were made with
this does not change repo history. it just changes where github displays credit. what happens if the work email gets deletedif you lose access to
so yeah, if you want those commits to count on your personal profile, you usually need to link/verify the email before it disappears. can i delete the work github account and still keep commits?commits don’t belong to the account, they belong to the repos. rewriting history (usually a bad idea)yes, it’s possible to rewrite commit authorship (filter-repo / filter-branch) to swap emails.
realistically: don’t do this unless the org explicitly wants it. private repos + “just copy them”careful: copying private company repos to your personal account is often against policy / contracts. practical move (what i’d do)
tl;dr
|
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
Question
Body
Hi all, I have been working at a company for a few months now, and am wondering if if's at all possible to transfer the commits form my work account to my personal one? Just to show that i have not been inactive for that time.
What would be the best way to transfer the commits to my personal account? and would it be possible to transfer them, delete the work email and still have the commits???
Thank you in advance for any help I really appreciate it
A few details:
Beta Was this translation helpful? Give feedback.
All reactions