The Steps to Change Your Username

Go to your GitHub account settings, find the "Account" section in the left sidebar, and look for the username field near the top. Your current username appears there. Click the text field, type your new username, and GitHub will tell you when ready whether it is available — unavailable names show a red X, available ones show a green checkmark. Click "Change username" to confirm.

GitHub processes the change right away. Your old username redirects to your new one for the next 30 days, so links people shared before the change still work. After 30 days, the old username becomes available for someone else to claim, and old links will break.

You do not need to update anything else manually. Your repositories, followers, and profile history all move with you. However, if you have cloned repositories on your computer using the old username in the URL, you will need to update those local copies so Git knows where to push changes.

Key Takeaways

  • Change your username in Account settings on GitHub, and the system tells you when ready whether the new name is available.
  • Your old username redirects to your new one for 30 days, so shared links do not break when ready.
  • Repositories and followers move automatically, but local clones on your computer need their remote URL updated.
  • After 30 days, your old username becomes available for others to use and old links will no longer work.

Updating Your Local Repository After a Username Change

If you have cloned a repository to your computer before changing your username, Git still points to the old URL. You can check what URL Git is using by opening your terminal or command prompt, navigating to the repository folder, and typing git remote -v. This shows you the current remote address.

To update it, type git remote set-url origin https://github.com/[new-username]/[repository-name].git, replacing [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 change took effect. The next time you push or pull, Git will use the new address.

If you have many repositories cloned locally, you will need to update each one separately. There is no single command that updates all of them at once.

What Happens to Your Old Username

For 30 days after you change your username, GitHub keeps your old name reserved and redirects it to your new profile. Anyone who visits your old profile URL or clicks an old link sees your new profile instead. This grace period gives you time to update links in your resume, portfolio, or other places where you shared your GitHub URL.

After 30 days, the old username becomes available for someone else to claim. If you want to keep it reserved longer, you can create a new account with the old username and leave it empty — this prevents someone else from using it, though GitHub may delete inactive accounts after a long period.

Reasons Your New Username Might Not Be Available

GitHub usernames must be between 1 and 39 characters, contain only letters, numbers, and hyphens, and cannot start or end with a hyphen. If you see a red X next to your choice, the name either violates these rules or someone else already has it.

You can also not use a username that is reserved by GitHub itself — names like "admin", "api", "blog", and others are blocked. If the name you want is taken by an inactive account, you have no way to claim it. GitHub does not have a process to request old usernames from dormant accounts.

Changing Your Username Does Not Affect Your Email or Password

Your GitHub username and your email address are separate things. Changing your username does not change the email you use to log in, and you do not need to update your password. You log in the same way you always have — with your email and password, or with a personal access token if you use one.

If you want to change the email address associated with your account, that is a separate setting in Account settings under "Email addresses". You can have multiple email addresses on file, and you can choose which one is primary.

Organizations and Teams Keep Working After a Username Change

If you are a member of a GitHub organization or team, your membership does not break when you change your username. The organization sees you by your account ID, not your username, so the change is invisible to the organization's settings and permissions.

However, if the organization has documentation or internal references that mention your old username, those will be outdated. You may want to let organization owners know about the change so they can update any internal records or team rosters.

Frequently Asked Questions

Can I change my username back to what it was before?

Yes, as long as no one else has claimed it. If you changed your username and then want to switch back within 30 days, you can do so because GitHub still reserves your old name. After 30 days, if someone else has taken it, you cannot use it again.

Do I need to update my SSH key after changing my username?

No. SSH keys are tied to your account ID, not your username, so they continue to work. However, if you use HTTPS instead of SSH and you have saved your credentials in Git, you may need to clear and re-enter them so Git uses the new URL.

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

If your GitHub Pages site is hosted at [old-username].github.io, it will stop working after 30 days when the old username becomes available to others. You should rename the repository to [new-username].github.io and update any DNS records or custom domain settings if you use a custom domain.

Can I change my username if I have a paid GitHub plan?

Yes. Your billing information and plan status are tied to your account, not your username, so changing your username does not affect your subscription or billing.