Yes, you can change your GitHub username, and your repositories move with you
GitHub lets you change your username at any time through your account settings. When you do, all your repositories, followers, and stars stay attached to your account — nothing gets lost or deleted. The change takes effect when ready, but GitHub redirects traffic from your old username to your new one for the next several months, which means links and clones using the old name still work during that window.
The main thing to know upfront: changing your username is free and reversible within a short period, but it does break some things that point to your old name. SSH keys, deploy keys, and any scripts or automation that reference your old username by URL will need updating. If you have a lot of integrations or if your username is published in documentation, the work adds up quickly.
Key Takeaways
- You change your username in your account settings under "Account" or "Profile", and the change takes effect when ready across all your repositories and profile pages.
- GitHub redirects your old username to your new one for several months, so old links and clone commands continue to work without manual updates.
- Any SSH clone URLs, deploy keys, or webhooks that reference your old username will stop working and must be updated manually.
- You can change your username back to what it was before, but only within a limited window — after that, the old name becomes available for someone else to claim.
Where to find the username change setting
Log into GitHub and click your profile picture in the top right corner. Select "Settings" from the dropdown menu. On the left sidebar, click "Account" (or sometimes labeled "Profile and more" depending on your account type). Scroll down until you see a field labeled "Username" or "Change username" — this is where you enter your new name.
GitHub will tell you when ready if the new username is already taken or if it contains characters that aren't allowed. Usernames can include letters, numbers, hyphens, and underscores, but they cannot start with a hyphen or number. Once you type a name that's available, click the button to confirm the change. That's it — the change is live within seconds.
What stays the same after you change your username
Your repositories, issues, pull requests, wikis, and all the code inside them remain exactly as they are. Your followers, stars, and contribution history all stay attached to your account. Any collaborators you've added to private repositories still have access. Your account ID — the number GitHub uses internally — never changes, so anything tied to that ID continues to work.
GitHub also keeps your old username reserved for you for a grace period (typically around 30 days, though this can vary). During that time, you can change back to your old username if you realize you made a mistake. After the grace period expires, someone else can claim your old username, so if you think you might want it back, change it sooner rather than later.
What breaks and needs updating
SSH clone URLs that use your old username will stop working. If you cloned a repository using git@github.com:oldusername/repo.git, that URL no longer points to your account. You'll need to update the remote URL in any local copies of your repositories using the command git remote set-url origin git@github.com:newusername/repo.git.
Deploy keys, personal access tokens used in scripts, and webhooks that reference your old username by URL will also break. If you have CI/CD pipelines, automated deployments, or third-party services that clone or push to your repositories using your old username, you'll need to update those configurations. Check any documentation, README files, or setup guides you've published that mention your username — those should be updated too, though the old links will still work temporarily.
If you've published your username in places outside GitHub — like on a personal website, in a portfolio, or in package manager registries — those won't update automatically. You'll need to change them manually wherever they appear.
How the redirect works and how long it lasts
For several months after you change your username, GitHub automatically redirects requests from your old username to your new one. This means if someone tries to visit github.com/oldusername, they'll be sent to github.com/newusername. Clone commands using your old username will still work because Git follows the redirect.
This grace period gives you time to update links, documentation, and configurations without everything breaking when ready. However, the redirect is not permanent — after the grace period ends, your old username becomes available for someone else to register, and the redirect stops working. At that point, any old links will return a 404 error, and clone commands using the old username will fail.
Changing your username back to the original
If you change your mind, you can change your username back to what it was before — but only during the grace period. Once that window closes and someone else claims your old username, you cannot get it back unless that person releases it. GitHub does not hold old usernames indefinitely or restore them on request.
If you're unsure about a change, test it first by updating one or two repositories and checking that your integrations still work. You can always change back within the grace period if something breaks that you didn't expect.
Planning ahead if you have many repositories or integrations
Before you change your username, make a list of everywhere it appears: in clone URLs across your team, in CI/CD configuration files, in package manager profiles, in documentation, and in any scripts or automation. If you have dozens of repositories or complex integrations, the redirect window gives you time to update things gradually, but you'll want to prioritize the most critical paths first.
If you manage repositories for an organization, changing your personal username won't affect the organization's repositories or URLs — those stay under the organization's name. However, if you have personal repositories that other people depend on, notify them before you make the change so they can update their configurations during the redirect window.
Frequently Asked Questions
Will my followers and stars disappear when I change my username?
No. Your followers, stars, and all your contribution history stay attached to your account. The account itself doesn't change — only the name you use to log in and the URL people visit changes.
Can someone else take my old username right after I change it?
Not when ready. GitHub reserves your old username for a grace period (usually around 30 days) so you can change back if needed. After that period ends, the old username becomes available for anyone to claim.
Do I need to update my SSH keys when I change my username?
Your SSH keys themselves don't need to be regenerated. However, if you have clone URLs saved that use your old username, those URLs will break. You'll need to update the remote URL in your local repositories to use your new username.
What happens to pull requests I've made to other people's repositories?
Your pull requests, comments, and contributions to other repositories stay attached to your account and display under your new username. The repositories you contributed to don't need to do anything — the change is automatic.
If I change my username, do I need to update my GitHub Pages site?
If your GitHub Pages site is hosted at oldusername.github.io, you'll need to rename the repository to newusername.github.io for the default domain to work. If you're using a custom domain, the site will continue to work without changes.