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

GitHub lets you change your username at any time through your account settings. The change takes effect when ready, and GitHub automatically redirects anyone who visits your old profile URL to your new one. However, there are a few things that break when you change it — mostly links you have shared, and any scripts or tools that reference your old username — so you should understand what happens before you do it.

The process is straightforward and reversible within a short window, but some of your integrations and shared links will need manual updates. This guide walks you through what to expect at each step.

Key Takeaways

  • You change your username in your account settings under "Change username", and the change is live within seconds.
  • GitHub redirects your old profile URL to your new one, so people who bookmark or share your profile link will still find you.
  • Any repository clone URLs, API calls, or scripts that use your old username will stop working and need to be updated manually.
  • If you have pushed code to repositories using your old username in the git config, those commits keep the old name in the history.
  • You cannot use a username that is already taken, and you must wait a short time before reusing a username you just gave up.

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. You will see a field labeled Change username with your current name displayed. Click the field, type your new username, and click Change username to confirm.

GitHub will tell you when ready if the name is taken or contains characters it does not allow. Usernames can contain letters, numbers, and hyphens, but cannot start or end with a hyphen. The change is live as soon as you confirm it.

What still works after you change your username

GitHub automatically redirects your old profile URL to your new one. If someone visits github.com/youroldname, they will be sent to github.com/yournewname. This redirect works indefinitely, so old links you shared, bookmarks, and search results will still point to the right place.

Your repositories themselves are not affected. All your code, issues, pull requests, and project history stay exactly where they are. The repositories still belong to you under your new username.

What breaks and needs to be updated

Any URL you have shared that points directly to a file, issue, or pull request will still work because GitHub redirects the domain. However, if you have shared a clone URL like git clone https://github.com/youroldname/repo.git, that URL will no longer work. Anyone trying to clone using the old URL will get an error.

If you have scripts, CI/CD pipelines, or tools that reference your username in API calls or URLs, those will break. For example, a GitHub Actions workflow that calls github.com/youroldname/some-action will fail. You will need to update any configuration files, documentation, or automation that hardcodes your old username.

If you have cloned repositories on your local machine using the old username in the clone URL, those local copies will still work — git does not care if the remote URL is outdated. However, if you push new code, it will push to the correct repository. To avoid confusion, you can update your local clone URLs by running git remote set-url origin https://github.com/yournewname/repo.git in each repository folder.

How your commit history is affected

Your commit history does not change. If you made commits while your git config was set to your old username, those commits will still show your old name in the history. The commits are tied to the email address in your git config, not to your GitHub username, so changing your GitHub username does not retroactively update commit authorship.

If you want commits to show your new username going forward, you need to update your local git config. Run git config --global user.name "Your New Name" in your terminal. This only affects commits you make from that point on. Old commits will keep their original author name.

Reclaiming or reusing a username

Once you change your username, GitHub reserves your old username for a short period. You cannot when ready take back the old name or give it to someone else. The exact wait time is not published, but it is typically a few minutes to a few hours. If you change your mind quickly, wait a bit and you can change back to your old username.

If someone else takes your old username while you are waiting, you cannot get it back. For this reason, if your username is tied to your professional identity or brand, think carefully before changing it.

Updating your team and documentation

If you work on a team or maintain public documentation, tell your collaborators about the change. Update any README files, contribution guides, or team wikis that mention your old username. Check for hardcoded references in any shared scripts or configuration files.

If you have published packages, libraries, or tools under your old username, consider whether you need to update the documentation or package metadata. Most package managers will still find your code, but the author field might show your old username if it was set at publish time.

Frequently Asked Questions

Will my repositories disappear if I change my username?

No. Your repositories stay with you and are accessible under your new username. GitHub redirects the old repository URLs to the new ones, so old links still work. Your code, issues, and pull request history are unchanged.

Do I need to update my local git repositories after changing my username?

Not when ready — your local clones will continue to work because git uses the repository ID, not the username, to track the remote. However, updating your clone URLs with git remote set-url is a good practice to avoid confusion and may support you are pushing to the correct place.

What happens to my GitHub Pages site if I change my username?

If you have a GitHub Pages site at youroldname.github.io, it will stop working after you change your username. You will need to rename the repository to yournewname.github.io for the site to rebuild and deploy under your new username.

Can I change my username back if I regret it?

Yes, you can change it back by going through the same process. However, if someone else has claimed your old username in the meantime, you will not be able to use it again. GitHub does not hold old usernames indefinitely.

Will changing my username affect my GitHub contributions graph?

No. Your contributions graph is tied to the email address in your git config and your GitHub account, not your username. Your contribution history and streak will remain intact after you change your username.