What happens to repositories when changing account email address? #185410
Replies: 10 comments 6 replies
-
|
Hi there, This is a really common situation. I’ve seen this before—here is exactly what happens when you switch emails:
No impact. Your repositories are tied to your username, not your email address. Changing your primary email to abc@gmail.com will not change your repository URLs or delete anything. They will stay exactly where they are.
This is where you need to be careful. Git links your past commits to your GitHub profile by matching the email address in the commit log to the emails listed in your account settings. If you remove xyz@gmail.com from your GitHub account entirely, your old commits (which were made with that email) will stop showing your profile picture. They will essentially become "unclaimed" and might not show up on your contribution graph (the green squares). The Fix: You should add abc@gmail.com as your new Primary email, but keep xyz@gmail.com listed as a secondary email on your GitHub account. Do not delete it from GitHub settings even if you stop using the inbox. This ensures your past history stays linked to you.
If you delete the Gmail account: Nothing happens to your GitHub repos. GitHub doesn't check if the inbox still exists; it just uses the email string as an ID. If you delete your GitHub account: Then yes, all your repositories will be deleted. Summary: Add abc and make it Primary. Keep xyz on the list so you don't lose your "green squares" history. Your repos are safe as long as you don't delete the GitHub account itself. Hope this helps you make the switch safely! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
If you only want to switch email, your repos are safe. I'm already done this once, hope this helps 🙏. |
Beta Was this translation helpful? Give feedback.
-
|
Hey there! 👋 Thanks for posting in the GitHub Community, @dev4Kushal ! We're happy you're here. You are more likely to get a useful response if you are posting in the applicable category. The Accessibility category is a place for our community to discuss and provide feedback on the digital accessibility of GitHub products. Digital accessibility means that GitHub tools, and technologies, are designed and developed so that people with disabilities can use them. I've gone ahead and moved this to the correct category for you, |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Hey @dev4Kushal , hope you get it ! Here is a breakdown of what will happen: b. Impact on Repositories c. If the Gmail Account (xyz@gmail.com) is Deleted |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
|
Your repositories are tied to your GitHub username, not your email address. Changing your primary email from xyz@gmail.com to abc@gmail.com has zero effect on repository ownership or names. All your repos stay exactly where they are, under the same username, with the same names, URLs, and history. Nothing moves or changes visually. |
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
GitHub Feature Area
Other
Body
Hi everyone,
I have a GitHub account with the email xyz@gmail.com and I've created several repositories with it. Now I want to change my account's primary email to abc@gmail.com.
I have a few questions about what will happen:
My existing repositories under which email account and creation name of repos will be on which name?
What will be the impact on repositories?
What if xyz@gmail.com is account deleted will the repos also deleted or no impact will be there?
I want to make sure I understand the implications before making this change. Any guidance would be greatly appreciated!
Thanks in advance! 🙏
Beta Was this translation helpful? Give feedback.
All reactions