You can change your GitHub username from your account settings, and GitHub will redirect your old username to your new one for a limited time

GitHub lets you change your username once every seven days. When you do, your old username becomes available for someone else to claim after a grace period, but GitHub automatically redirects traffic from your old profile URL to your new one for about 20 months. This means existing links to your repositories and profile will still work, though the address bar will show your new name.

The change itself takes seconds. The harder part is understanding what breaks and what doesn't — pull requests, commit history, and team mentions all stay attached to your account, but some integrations and local Git configurations may need updates on your end.

Key Takeaways

  • You can change your GitHub username from Settings > Account, and the change takes effect when ready across all your repositories and profile pages.
  • GitHub redirects your old username to your new one for approximately 20 months, so old links to your profile and repos will still work.
  • Your commit history, pull requests, and issues all stay attached to your account — the username change is cosmetic from Git's perspective.
  • If you use SSH keys or have cloned repositories locally, you may need to update the remote URL in those repositories to match your new username.
  • You can only change your username once every seven days, so choose carefully before you confirm the change.

Step-by-step: changing your username

Log into GitHub and go to your account settings. Click the "Account" tab in the left sidebar — this is different from "Profile settings", which only changes your display name. Under the "Change username" section, you'll see your current username in a text field.

Type your new username and click "Change username". GitHub will check whether the name is available. If it is, you'll see a confirmation dialog warning you that the change is permanent and that you can only change it again after seven days. Click the button to confirm. Your username changes when ready.

After the change, GitHub sends you an email confirming the switch. Your old username enters a grace period during which it cannot be claimed by anyone else. After that grace period ends (roughly 20 months), someone else can register it.

What stays the same after you change your username

Your commit history does not change. Every commit you made under your old username stays attached to your account. When someone views your repository, they'll see your new username next to those commits, but the underlying data is unchanged. The same applies to pull requests, issues, and comments — they all follow your account, not your username.

GitHub automatically redirects your old profile URL to your new one. If someone has a bookmark or a link to github.com/oldusername, it will forward them to github.com/newusername. This redirect lasts about 20 months. After that, the old URL will 404 if no one has claimed the username.

Team memberships, organization roles, and repository access permissions all stay intact. You don't need to rejoin teams or ask for access again.

What you may need to update on your own machine

If you have repositories cloned to your computer and you use SSH to push and pull, you should update the remote URL. Open your terminal, navigate to the repository folder, and run git remote -v to see the current remote. If it shows your old username, update it with git remote set-url origin git@github.com:newusername/reponame.git.

If you use HTTPS instead of SSH, Git will prompt you for credentials the next time you push or pull, and you can enter your new username then. The change is not automatic, but it's not required — GitHub will accept pushes from either the old or new username for a while.

Check any scripts, CI/CD pipelines, or deployment tools that reference your old username directly in URLs or configuration files. If you have GitHub Actions workflows, Docker build scripts, or deployment configs that hardcode your username, update those before they fail on the next run.

Integrations and third-party tools

Many tools that connect to GitHub — like code editors, deployment platforms, and monitoring services — store your username in their configuration. These tools will usually continue to work because they authenticate using your personal access token or SSH key, not your username. However, if a tool displays your username in its interface or logs, it may show the old name until you update it in that tool's settings.

If you use GitHub's API in scripts or applications, check whether any code hardcodes your username in URLs or queries. API calls that reference your username directly will need to be updated. Calls that use your token or SSH key will work regardless of your username.

Undoing a username change

You cannot undo a username change directly, but you can change it back to your old username if no one else has claimed it. Since you can only change your username once every seven days, you'll need to wait a week after your first change before you can switch back. If someone else has registered your old username during that week, you cannot reclaim it.

This is why it's worth thinking through your new username before you confirm. If you're unsure, you can always change it again in seven days.

Frequently Asked Questions

Will my old GitHub links stop working?

No. GitHub redirects your old username to your new one for about 20 months. Links to your profile, repositories, and issues will automatically forward to the new URL. After 20 months, the redirect expires, and old links will 404 if no one has claimed your old username.

Do I need to update my SSH key or personal access token?

No. Your SSH key and personal access token are tied to your account, not your username. They will continue to work after you change your username. You only need to update the remote URL in local repositories if you use SSH and the URL contains your old username.

What happens to my repositories when I change my username?

Your repositories stay in your account and are accessible under your new username. The repository URLs change from github.com/oldusername/reponame to github.com/newusername/reponame, but GitHub redirects the old URLs for about 20 months. Forks and clones of your repositories will still point to your account.

Can someone else take my old username when ready?

Not when ready. After you change your username, GitHub holds your old username for a grace period (roughly 20 months) before it becomes available to others. This gives you time to update links and integrations without worrying that someone will claim it.

How often can I change my username?

You can change your username once every seven days. If you change it and then want to change it again, you must wait seven days from the date of your last change before GitHub will let you make another one.