What happens when you change your GitHub username
When you change your username on GitHub, your profile URL changes when ready, but your account and all your repositories stay yours. GitHub automatically redirects traffic from your old username to your new one for six months, so old links still work during that window. After six months, someone else can claim your old username, and the redirect stops.
Your repositories, stars, followers, and contribution history all move with you. However, any Git remotes you have set up locally on your computer will still point to the old username — you'll need to update those manually on each machine where you cloned repositories. If you have SSH keys configured, they continue to work without changes.
Key Takeaways
- Change your username in GitHub Settings under Account, and the change takes effect when ready across your entire account.
- GitHub redirects your old username to your new one for six months, but after that period someone else can claim it.
- Update your local Git remotes on each computer by running git remote set-url origin with your new username in the URL.
- Any integrations, webhooks, or third-party apps connected to your account may break if they reference your old username in their configuration.
- You can change your username back to a previous one if you do it within 30 days and no one else has claimed it.
Steps to change your username in GitHub Settings
Log into GitHub and go to your account settings by clicking your profile picture in the top right corner, then select Settings. On the left sidebar, click Account. You'll see a field labeled "Username" with your current name displayed.
Click the Change username button next to it. GitHub will show you a warning that explains the redirect period and asks you to confirm. Type your new username into the text field. GitHub checks in real time whether the name is available — if it's taken, you'll see a red X and won't be able to proceed. If it's available, you'll see a green checkmark.
Once you've entered an available name, click I understand, let's change my username. Your username changes when ready. GitHub sends you a confirmation email to the address on file.
Update your local repositories after changing your username
Any repository you cloned before the change still has the old username in its remote URL. When you try to push or pull, Git will still reference your old username, which no longer exists. You need to update each repository's remote URL on every computer where you cloned it.
Open a terminal or command prompt and navigate to the repository folder. Run this command to see your current remote URL:
git remote -v
You'll see output showing your origin URL with your old username. To update it, run:
git remote set-url origin https://github.com/[new-username]/[repository-name].git
Replace [new-username] with your new GitHub username and [repository-name] with the actual name of the repository. Run git remote -v again to confirm the URL now shows your new username. Repeat this for every repository on that computer, then repeat the entire process on any other machines where you have cloned repositories.
Fix broken integrations and webhooks
If you have connected third-party tools to your GitHub account — like continuous integration services, deployment tools, or automation platforms — some may stop working after you change your username. These tools often store your username in their configuration and use it to authenticate or reference your repositories.
Check any services you use regularly: Travis CI, CircleCI, GitHub Actions, Slack integrations, or any custom webhooks you've set up. Look for settings pages where your GitHub username appears and update them to your new name. If a service has stored your old username in a configuration file, you'll need to edit that file and redeploy it.
If you're not sure which services are connected, go to your GitHub Settings, click Applications on the left sidebar, then Authorized OAuth Apps. This shows every third-party service that has permission to access your account. Review each one and check whether it needs an update.
Revert your username if you change your mind
If you realize you made a mistake, you can change back to your previous username within 30 days, as long as no one else has claimed it. Go back to Settings > Account and follow the same process. GitHub treats this as a new username change, so the same rules explore — you get another six-month redirect period from the new name back to the old one.
After 30 days, you can no longer reclaim your old username through the settings. If someone else has already taken it, you're locked out. If no one has claimed it yet, you can still change to it, but you'll need to contact GitHub Support to do so — the self-service option is no longer available.
What doesn't change when you update your username
Your GitHub ID number stays the same. This is the unique identifier GitHub uses internally, separate from your username. Any API calls or database references that use your ID will continue to work. Your email address, password, and two-factor authentication settings remain unchanged.
Your contribution graph, stars, followers, and all public activity history stay attached to your account. People who follow you will still see your activity. Any repositories you own or collaborate on will still show you as the owner or contributor, just with your new username displayed.
Frequently Asked Questions
Can someone else take my old username right away?
No. GitHub reserves your old username for six months after you change it and automatically redirects traffic to your new account. After six months, the old username becomes available for anyone to claim. If you think you might want it back, change back within 30 days while you still can.
Will my SSH keys stop working after I change my username?
No. SSH keys are tied to your account ID, not your username, so they continue to work without any changes. However, if you use HTTPS instead of SSH and have stored your credentials, you may need to update them in your system's credential manager if they include your old username.
What happens to pull requests and issues I created with my old username?
They stay attached to your account and display your new username. The history shows your new name going forward. People can still see the full timeline of when you created them and what you wrote, but your username will show as the new one everywhere.
Do I need to update my GitHub Pages site URL?
If your GitHub Pages site uses the default domain (username.github.io), it will automatically update to your new username. If you have a custom domain pointing to it, no changes are needed. If you have hardcoded your old username anywhere in your site's content or configuration files, you should update those references.
Will changing my username affect my GitHub Actions workflows?
Workflows themselves will continue to run, but if they reference your old username in any step — such as checking out a private repository or pushing to a registry — those steps may fail. Review your workflow files (.github/workflows/) and update any hardcoded references to your old username.