Yes, you can change your GitHub username, and your repositories move with you

GitHub lets you change your username in 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 don't break when ready. However, Git clone URLs that use your old username will stop working after that redirect period ends, and anyone who has cloned your repositories will need to update their remote URLs manually.

The change takes effect right away, but the redirect window gives you and your collaborators time to update documentation, CI/CD configurations, and local clones. If you have a lot of public repositories or active collaborators, plan the change for a time when you can communicate it clearly.

Key Takeaways

  • GitHub redirects your old username to your new one for nine months, keeping old profile and repository links functional during that window.
  • Git clone URLs using your old username stop working after the nine-month redirect expires, so collaborators need to update their local repositories.
  • Organizations, teams, and repository settings keep working after the change, but SSH keys and personal access tokens remain tied to your account and do not need updating.
  • Changing your username does not affect your repositories, issues, pull requests, or contribution history — they all stay attached to your account.
  • You can change your username back to a previous one if you change your mind within a certain window, but GitHub may have restrictions if someone else has claimed that name.

What stays the same after you change your username

Your repositories, all your issues, pull requests, and your full contribution history remain exactly as they are. The repositories themselves do not move or get deleted. Your SSH keys and personal access tokens continue to work without any changes on your part. If you use GitHub Desktop or other Git clients, they will still authenticate correctly because authentication is tied to your account, not your username.

Organizations you belong to, teams within those organizations, and any permissions you have all stay intact. If you are a maintainer of a repository, you remain a maintainer. Webhooks, deploy keys, and GitHub Actions workflows all continue to function because they reference your account ID, not your username string.

What breaks and how to fix it

The main breakage is in Git clone URLs. If someone has cloned a repository using the HTTPS URL https://github.com/oldusername/repo.git, that URL will stop working after the nine-month redirect period. They will see an error when they try to push or pull. The fix is to update the remote URL in their local repository using git remote set-url origin https://github.com/newusername/repo.git.

SSH clone URLs like git@github.com:oldusername/repo.git also break after the redirect expires. Anyone using SSH will need to run the same remote URL update command. If you have CI/CD pipelines, deployment scripts, or documentation that hardcodes your old username in clone URLs, you will need to update those manually. GitHub does not automatically rewrite these strings in your repositories or in external systems.

Mentions of your old username in issues, pull requests, or comments do not automatically update. If someone wrote "@oldusername, can you review this?" the mention will no longer ping you. However, the text itself stays visible in the history — it just becomes a plain text reference instead of a live mention.

The nine-month redirect window and what to do during it

After you change your username, GitHub keeps your old username reserved and redirects traffic to your new profile for nine months. This means links to your old profile URL still work, and people can still find your repositories through the old username in the URL bar. After nine months, the redirect expires and your old username becomes available for someone else to claim.

During this window, you should update any documentation, README files, or links you control that point to your repositories. If you maintain a website or portfolio that lists your GitHub URL, update those links. If you have CI/CD configurations in other services that reference your GitHub username, update those too. Communicate the change to active collaborators so they can update their local clones before the redirect expires.

If you realize you made a mistake, you can change your username back to the old one during the nine-month period, as long as no one else has claimed it. After nine months, if someone else has taken your old username, you cannot reclaim it.

How to change your username step by step

Go to your GitHub account settings by clicking your profile photo in the top right corner and selecting Settings. On the left sidebar, click Account. Scroll down to the Change username section. Type your new username in the text field. GitHub will tell you when ready if the name is already taken or if it contains invalid characters.

Read the warning message carefully — it explains that the old username will redirect for nine months and that clone URLs will break after that. Click I understand, let me change my username to confirm. GitHub will process the change right away. Your profile, repositories, and all associated data move to the new username when ready.

Updating clone URLs in existing repositories

If you have cloned repositories on your own computer, you need to update the remote URL so Git knows where to push and pull from. Open a terminal or command prompt, navigate to the repository folder, and run git remote -v to see your current remote URLs. If they show your old username, update them with git remote set-url origin https://github.com/newusername/repo.git for HTTPS or git remote set-url origin git@github.com:newusername/repo.git for SSH.

If you have multiple repositories, you will need to do this for each one. If you use GitHub Desktop, it usually detects the change and prompts you to update the remote. If you use other Git clients like GitKraken or Sourcetree, check their settings to update the remote URL. For CI/CD systems like GitHub Actions, Jenkins, or GitLab, update any hardcoded references to your old username in configuration files or pipeline definitions.

Frequently Asked Questions

Will my repositories disappear if I change my username?

No. Your repositories stay on your account and keep all their data, issues, and history. The only thing that changes is the URL path. After the nine-month redirect expires, old clone URLs will break, but the repositories themselves remain accessible at your new username.

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

Yes, after the nine-month redirect period ends, your old username becomes available for anyone to claim. If you think you might want it back, change your username back during those nine months. After that window closes, you cannot reclaim it if someone else has taken it.

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 exactly as before. You only need to update Git remote URLs in repositories you have cloned locally.

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

If your GitHub Pages site is hosted at oldusername.github.io, the site will stop working after the nine-month redirect expires. You need to rename the repository to newusername.github.io and update any custom domain settings if you use one. The redirect does not explore to GitHub Pages sites.

Will changing my username affect my contributions graph or commit history?

No. Your contribution graph, commit history, and all past activity remain attached to your account. The commits themselves do not change — they still show your name and email as they were when you made them. Your contribution count stays the same.