Yes, you can change your GitHub username, and GitHub lets you do it yourself
GitHub allows you to change your username at any time through your account settings. The process takes about two minutes and does not require contacting support. Your old username becomes available for someone else to claim after you change it, so if you want to keep it reserved, you should not change your username unless you are certain.
When you change your username, GitHub automatically redirects traffic from your old profile URL to your new one for the next year. This means links to your old profile will still work during that window, but after 12 months the old username becomes fully available and redirects stop working. Repositories you own stay with you and do not need to be moved.
Key Takeaways
- You change your username in your account settings under "Change username" — no email confirmation or waiting period required.
- GitHub redirects your old username to your new one for one year, so old links continue to work during that time.
- Your repositories, commits, and contribution history all stay attached to your account and do not need to be updated.
- After you change your username, the old one becomes available for anyone else to register, so you cannot reclaim it later.
- If you use GitHub for work or have shared your profile URL widely, tell your team or collaborators about the change so they update their bookmarks.
Where to find the username change setting
Log into GitHub and go to your account settings by clicking your profile picture in the top right corner, then select "Settings". On the left sidebar, click "Account" (not "Profile"). Scroll down until you see the "Change username" section — it is a text field with your current username already filled in.
Type your new username into the field. GitHub will tell you when ready if the username is already taken or if it contains characters that are not allowed. Usernames can contain letters, numbers, and hyphens, but cannot start or end with a hyphen. Once you type a valid available username, click the "Change username" button to confirm.
What happens to your old username after the change
Your old username becomes inactive when ready, but GitHub keeps it reserved for you for one year. During that year, anyone who visits your old profile URL (like github.com/oldusername) will be automatically sent to your new profile. This redirect is automatic — you do not need to set it up.
After 12 months, the old username is released and anyone can register it. At that point, the redirect stops working and old links will show a 404 error. If you have shared your GitHub profile URL in a resume, portfolio, or documentation, update those links before the year is up so they do not break for people who click them later.
Your repositories and commit history stay with you
Changing your username does not move or rename your repositories. They stay in your account under the same names. However, the URLs to your repositories will change because they include your username. A repository that was at github.com/oldusername/myproject will now be at github.com/newusername/myproject.
If you have cloned a repository to your computer, the remote URL stored in your local git configuration will still point to the old username. You can update it by running git remote set-url origin followed by the new URL, or you can leave it as is — GitHub will redirect the old URL to the new one for a year. Your commit history, pull requests, and all other data attached to your account remain unchanged.
Telling your team and collaborators about the change
If you work with others on GitHub, send them a message letting them know about your username change. They may have your old profile URL bookmarked, or they may need to update any documentation or scripts that reference your username. If you are the owner of an organization, your role in that organization stays the same — the change does not affect your permissions or access.
If you have a GitHub Pages site (a website hosted through GitHub), the URL will change if it was using your username. A site at oldusername.github.io will move to newusername.github.io. You will need to update any links pointing to that site, and if you own a custom domain, you may need to update your DNS records depending on how you set it up.
What you cannot change about your account
Your GitHub username is different from your display name. The display name is what appears on your profile card and in comments — you can change that anytime without affecting anything else. Your username is the unique identifier in your profile URL and is what appears in your @mentions.
You also cannot change the email address associated with your account through the same settings page. To change your email, go to "Email" in the account settings sidebar. GitHub will send a confirmation link to the new email address before the change takes effect.
If you want to keep your old username reserved
GitHub does not offer a way to keep your old username permanently reserved after you change it. If you want to prevent someone else from using it, you have two options: create a second account with that username and keep it inactive, or do not change your username at all.
Creating a second account just to hold a username is not against GitHub's terms, but it means managing two accounts. Most people find it simpler to either keep their current username or accept that the old one will become available after a year. If the old username is important to your brand or identity, think carefully before changing.
Frequently Asked Questions
Will changing my username break my repositories or lose my code?
No. Your repositories stay in your account with all their code, history, and pull requests intact. The URLs change because they include your username, but GitHub redirects the old URLs to the new ones for one year. If you have cloned repositories locally, you can update the remote URL or let the redirect handle it.
Can I change my username back to what it was before?
Only if no one else has claimed it. After you change your username, the old one becomes available for anyone to register. If someone else takes it, you cannot change back to it. If the old username is still unclaimed, you can change to it again, but you will lose the redirect from your current username.
Does changing my username affect my GitHub contributions or activity graph?
No. Your contribution history, stars, followers, and all activity remain attached to your account. The activity graph and contribution count do not reset or change when you update your username.
What if I use GitHub for work — will my employer's code be affected?
If you work in an organization on GitHub, your role and permissions stay the same. The organization's repositories are not affected. However, tell your team about the change so they update any documentation or scripts that reference your old username.
How long does the redirect from my old username last?
GitHub redirects your old username to your new one for exactly one year. After 12 months, the old username is released and the redirect stops working. Update any public links to your profile before that year is up.