Yes, you can change your GitHub username, and GitHub keeps your repositories intact
GitHub lets you change your username through your account settings. When you do, your old username redirects to your new one for about nine months, so links to your profile and repositories still work. The repositories themselves stay where they are — they don't move or break.
The catch is that some things tied to your username stop working right away. Git commands that reference your old username will fail. Collaborators who have cloned your repositories using the old username in the URL will need to update their local copies. If you have a lot of public repositories or active collaborators, the change creates work for other people, so it's worth planning ahead.
Key Takeaways
- You change your username in your account settings under "Account" or "Change username", and GitHub holds the old name for nine months so old links still reach you.
- Git commands and clone URLs that use your old username stop working when ready, so anyone with a cloned repository needs to run git remote set-url to point to the new URL.
- GitHub Pages sites and any documentation or scripts that hardcode your username will break unless you update them after the change.
- Organization names cannot be changed the same way — if you need a new organization name, you have to create a new organization and transfer repositories to it.
Where to find the username change setting
Log into GitHub and go to your account settings. On the left sidebar, click "Account" (or "Account and profile" depending on your GitHub version). Scroll down until you see "Change username" or "Username". Click the button to edit it.
GitHub will show you a warning that lists what will break: Git clone URLs, GitHub Pages URLs, and API calls that use your username. Read this list carefully. If you have a lot of repositories or a GitHub Pages site, the impact is bigger than if you have just a few private projects.
What breaks when ready when you change your username
Any Git command that references your old username stops working right away. If someone cloned your repository using git clone https://github.com/oldusername/repo.git, that URL is now dead. They need to run git remote set-url origin https://github.com/newusername/repo.git to point their local copy to the new location.
GitHub Pages sites break if they use your old username in the URL. If your site was at oldusername.github.io, it stops serving content. You'll need to update your repository settings and possibly your DNS records if you use a custom domain. Any links in documentation, README files, or scripts that hardcode your old username also need updating.
SSH keys and deploy tokens still work — they're tied to your account, not your username. But any CI/CD pipeline or automation that builds a Git URL using your username will fail and need reconfiguration.
The nine-month redirect window and what it covers
GitHub redirects your old username to your new one for nine months. This means links to your profile page, repository pages, and gists still work during that window. Someone who bookmarked github.com/oldusername will be sent to github.com/newusername automatically.
The redirect does not cover Git clone URLs or API calls. Those fail when ready. The redirect is for human-readable web links only. After nine months, the redirect expires and the old username becomes available for someone else to claim.
Notifying collaborators and updating your own work
If you have active collaborators, tell them before you change your username. Give them the new URL and ask them to run git remote set-url origin https://github.com/newusername/repo.git on their local copies. If they don't update, their next push will fail.
Search your own repositories for any hardcoded references to your old username. Check README files, documentation, configuration files, and any scripts that build Git URLs. Update these before or when ready after the change. If you maintain a GitHub Pages site, test it after the change to make sure it's still serving content.
If you use GitHub Actions or any other CI/CD tool, check that your workflows don't hardcode your username in clone URLs or API calls. Update any secrets or environment variables that reference your old username.
Changing an organization name is different
If you own an organization and want to change its name, you cannot do it the same way. GitHub does not have a "change organization name" feature. Instead, you have to create a new organization with the name you want, then transfer all repositories from the old organization to the new one.
This is more disruptive than changing a personal username because organization names appear in repository URLs and are often used in documentation and automation. Before you transfer repositories, update any CI/CD pipelines, deploy keys, and external tools that reference the old organization name.
Frequently Asked Questions
Will my repositories disappear if I change my username?
No. Your repositories stay in the same place. The URLs change from github.com/oldusername/repo to github.com/newusername/repo, but the repository itself and all its history remain intact. GitHub redirects the old URLs for nine months.
What happens to my GitHub Pages site when I change my username?
If your site is at oldusername.github.io, it stops working when ready. You need to update your repository settings to point to the new username. If you use a custom domain, you may need to update DNS records. Check GitHub's Pages documentation for your specific setup.
Can I claim my old username after I change it?
Not right away. Your old username is reserved for nine months. After that, it becomes available for anyone to claim. If you think you might want it back, wait until after the nine-month window expires and the redirect is gone.
Do I need to update my SSH keys or personal access tokens?
No. SSH keys and personal access tokens are tied to your account, not your username. They continue to work after you change your username. You only need to update Git URLs and any scripts or tools that build URLs using your old username.
What if someone else takes my old username after the redirect expires?
After nine months, your old username becomes available. If someone else claims it, any remaining links to your old profile will point to their account instead. This is rare but possible. Make sure you update all your own documentation and external links before the nine-month window closes.