Yes, you can change your GitHub username anytime, and it takes about two minutes

GitHub lets you change your username whenever you want. The process is straightforward: go to your account settings, find the username field, type a new one, and save. Your old username becomes available for someone else to claim after a short waiting period, and GitHub automatically redirects traffic from your old profile URL to your new one for a limited time.

The main thing to understand is that changing your username affects the URLs where people find your repositories and profile, but it does not break existing clones or damage your work. If you have shared links to your repositories, those old links will still work temporarily, but you should update them in your documentation and README files to point to the new address.

Key Takeaways

  • You change your username in Settings under Account, and the change takes effect when ready.
  • GitHub redirects your old profile URL to your new one for a limited time, so old links do not break right away.
  • Your repositories keep all their history and data — the change only affects the web address where they live.
  • If you have cloned repositories locally, you should update the remote URL in your git config to match your new username.
  • Your old username becomes available for others to use after you change it, so choose a new one you plan to keep.

How to change your username in GitHub settings

Log into GitHub and click your profile photo in the top right corner. Select Settings from the dropdown menu. On the left sidebar, click Account. You will see a field labeled "Username" with your current name in it. Click in that field, delete the old name, and type your new username.

GitHub will tell you when ready whether the username is available. If it is taken, you will see a red X and a message saying the name is unavailable. If it is free, you will see a green checkmark. Once you see the green checkmark, click Update username to save the change. Your new username is live right away.

What happens to your old profile URL and repositories

When you change your username, your old profile URL stops working as a direct address, but GitHub redirects it to your new one. This means if someone visits github.com/oldusername, they will be sent to github.com/newusername automatically. This redirect lasts for a limited time — GitHub does not specify exactly how long, but it is long enough for you to update links in your documentation.

Your repositories do not move or lose any history. A repository that was at github.com/oldusername/myproject will now be at github.com/newusername/myproject. The same redirect applies: old links will forward to the new address. However, you should update any links in your README files, documentation, or websites that point to your repositories, because the redirect will not last forever.

Updating your local git repositories after a username change

If you have cloned repositories on your computer, the remote URL still points to your old username. This does not break anything when ready — git will still be able to push and pull because GitHub knows who you are from your authentication. However, it is good practice to update the remote URL so it matches your new username.

To update a repository on your computer, open a terminal or command prompt in that repository folder and run git remote -v to see the current remote URL. It will show something like https://github.com/oldusername/myproject.git. To change it, run git remote set-url origin https://github.com/newusername/myproject.git, replacing the old username with your new one. Run git remote -v again to confirm the change took effect.

What you should update after changing your username

Search your README files, documentation, and any websites you maintain for links to your GitHub profile or repositories. These will still work temporarily because of the redirect, but updating them now means they will not break when the redirect expires. Look for links like github.com/oldusername or github.com/oldusername/projectname and replace them with your new username.

If you have shared your GitHub profile URL in a resume, portfolio, or social media, update those too. If you use GitHub Pages to host a website, check whether your site URL includes your username — some GitHub Pages URLs do, and some do not, depending on how you set them up. If yours does, you may need to update your site settings or DNS records.

Reasons to think twice before changing your username

Your username becomes part of your professional identity on GitHub. If you have built a portfolio, published packages, or contributed to open source under a certain name, changing it means your work will appear under a different URL. People who know you by your old username may have trouble finding you. If you are well-known in a community under a particular name, a change can make you harder to locate.

That said, GitHub handles the redirect well enough that a one-time change is not catastrophic. Just be aware that if you change your username multiple times, the redirect chain becomes confusing and old links break faster. Choose a new username you plan to keep for the long term.

Frequently Asked Questions

Will changing my username break my repositories or lose my code?

No. Your code, history, and all repository data stay exactly the same. Only the web address changes. GitHub redirects the old address to the new one, so existing clones and forks continue to work.

Can someone else take my old username after I change it?

Yes. After you change your username, the old one becomes available for others to claim. If you think you might want it back, do not change your username. Once someone else takes it, you cannot reclaim it.

Do I need to update my SSH keys or authentication after changing my username?

No. Your SSH keys and authentication credentials are tied to your account, not your username. They will continue to work exactly as before. You only need to update the repository URLs in your local git config if you want them to match your new username.

What if I change my username and then want to change it back?

You can change it back anytime by following the same process. However, if someone else claimed your old username in the meantime, you cannot have it back. Choose carefully before you change.

Does changing my username affect my GitHub contributions graph or commit history?

No. Your contributions graph and all commit history remain attached to your account. The commits will still show as yours, and your contribution count does not change. Only the username displayed next to your work updates.