Changing your GitHub username in three steps
You can change your GitHub username from your account settings page. GitHub will redirect your old username to your new one for 30 days, so existing links and repositories won't break immediately — but you should update them yourself to avoid confusion later. The process takes about two minutes and doesn't affect your repositories, followers, or contribution history.
After you change your username, GitHub sends you an email confirmation. If you use GitHub Desktop or have SSH keys set up on your computer, you may need to update those settings separately so your local work stays connected to your account.
Key Takeaways
- Go to Settings > Account, find the "Change username" field, type your new name, and click Update to confirm the change.
- GitHub redirects your old username to your new one for 30 days, but you should update any bookmarks, documentation, or CI/CD pipelines that reference your old name.
- If you use GitHub Desktop, you need to update the repository URL in your local settings after changing your username.
- SSH keys and personal access tokens continue to work after a username change, so you don't need to regenerate them.
- Your repositories, stars, followers, and contribution history all stay with your account under the new username.
Step-by-step: changing your username on GitHub.com
Step 1: Sign in and open Settings. Go to github.com and sign in with your current username and password. In the top right corner, click your profile picture, then select Settings from the dropdown menu.
Step 2: Find the Account tab. On the left sidebar, click Account. You'll see a section labeled "Change username" with a text field showing your current name.
Step 3: Enter your new username and confirm. Click in the text field and type your new username. GitHub will tell you right away if the name is already taken or contains invalid characters (usernames can only use letters, numbers, and hyphens). Once you've entered a valid name, click Update username. GitHub will ask you to confirm by typing your password again.
That's the entire process. Your new username is live immediately, and you'll receive a confirmation email at your registered address.
What happens to your old username
For 30 days after you change your username, GitHub automatically redirects your old username to your new one. This means if someone visits github.com/youroldname, they'll be sent to github.com/yournewname. Your repositories, profile, and all your public activity remain accessible under the new name.
After 30 days, GitHub releases your old username back into the pool, and someone else can claim it. At that point, the old URL stops working. This is why you should update any links you control — documentation, README files, portfolio sites, or CI/CD configuration files — before the 30-day window closes.
If you have a GitHub Pages site (like username.github.io), the URL changes to match your new username. You'll need to update any external links pointing to that site, and if you have a custom domain set up, it continues to work without changes.
Updating GitHub Desktop after a username change
If you use GitHub Desktop to work with your repositories, you need to update the repository URL on your local machine. GitHub Desktop won't automatically know about your username change.
To update a repository in GitHub Desktop: Open GitHub Desktop and go to Repository > Repository Settings. Look for the "Remote" section and check the URL listed there. If it still shows your old username, click the pencil icon next to it and change the URL to use your new username. For example, change from https://github.com/oldusername/repo to https://github.com/newusername/repo. Click Update and you're done.
If you have many repositories, you can also update them from the command line. Open your terminal, navigate to each repository folder, and run: git remote set-url origin https://github.com/newusername/reponame.git. This updates the connection between your local files and GitHub without losing any of your work.
Updating CI/CD pipelines and automation
If you use GitHub Actions, Jenkins, or other automation tools that reference your username in their configuration, those references will break after 30 days when the redirect expires. Search your repository files for your old username and update any instances you find.
Common places to check: workflow files in the .github/workflows folder, any scripts that clone repositories, Docker configuration files, and deployment settings. If you use a personal access token in your CI/CD setup, you don't need to regenerate it — the token stays valid after a username change.
If you're not sure where your username appears in your code, use your repository's search function (the magnifying glass icon on the repository page) to find instances of your old username and update them one by one.
What doesn't change when you update your username
Your repositories, commit history, stars, followers, and all contribution data stay exactly as they are. The change is purely cosmetic — your account identity and all its contents remain the same, just under a new name. SSH keys and personal access tokens continue to work without regeneration.
If you have a verified badge or organization membership, those stay with your account. Any invitations or permissions you've been granted remain active. The only thing that changes is the name people see when they visit your profile or clone your repositories.
Frequently Asked Questions
Can I change my username back to what it was before?
Yes, but only if no one else has claimed your old username in the meantime. If you changed from "alice" to "alice-dev" and then want to go back to "alice", you can do that as long as "alice" is still available. If someone else took it during the 30-day redirect window, you'll have to choose a different name.
Will my repositories disappear if I change my username?
No. Your repositories stay with your account and are accessible under your new username. The old URLs redirect for 30 days, so existing links still work temporarily. After 30 days, the old links stop working, which is why you should update any links you control.
Do I need to update my SSH key after changing my username?
No. SSH keys are tied to your account, not your username, so they continue to work without any changes. The same is true for personal access tokens — they remain valid after a username change.
What if I'm part of an organization?
Your organization membership stays the same. The organization's repositories and settings don't change. Your username change only affects your personal profile and personal repositories.
Can I change my username more than once?
Yes, you can change it as many times as you want. There's no limit on how often you can update your username, but each change triggers a 30-day redirect period and requires you to update any links or configuration files that reference your old name.