You can change your GitHub username from your account settings, and GitHub will redirect your old username to the new one for 30 days
GitHub lets you rename your account without losing your repositories or contribution history. When you change your username, GitHub automatically forwards traffic from your old username to your new one for 30 days, which gives collaborators and tools time to catch up. After 30 days, the old username becomes available for someone else to claim.
The process takes about five minutes and requires only that you be logged into your account. You do not need to contact GitHub support unless something goes wrong.
Key Takeaways
- Change your username in Settings > Account, type the new name, and confirm the change — no email verification required.
- GitHub redirects your old username to your new one for 30 days, so existing links and clones still work during that window.
- After 30 days, update any scripts, CI/CD pipelines, or documentation that reference your old username, because the redirect expires.
- Your repositories, stars, followers, and contribution history all move with you — nothing is lost when you change your name.
- If you want to keep your old username reserved, create a new account and transfer repositories to it instead of renaming.
Step 1: Log in and open your account settings
Go to github.com and sign in with your current username and password. Click your profile picture in the top right corner and select Settings from the dropdown menu.
On the left sidebar, click Account. This is where you control your username, email, and other core account details.
Step 2: Find the username field and type your new name
In the Account settings page, look for the Username field near the top. It currently shows your existing username. Click in the field and delete the old name, then type your new username.
GitHub will tell you when ready if the name is already taken or if it contains characters that are not allowed. Usernames can include letters, numbers, hyphens, and underscores, but cannot start with a hyphen or contain consecutive hyphens.
Step 3: Confirm the change
After you type your new username, click the Change username button below the field. GitHub will show you a warning that explains what will happen: your old username will redirect to your new one for 30 days, and any repositories you own will move to the new username.
Read the warning carefully. If you are certain, click the confirmation button. GitHub does not send a confirmation email — the change takes effect when ready.
Step 4: Update your local repositories and tools
If you have cloned repositories on your computer, the remote URL still points to your old username. You do not need to fix this right away because of the 30-day redirect, but you should update it before the redirect expires.
Open a terminal in your repository folder and run git remote -v to see the current remote URL. If it shows your old username, run git remote set-url origin https://github.com/[new-username]/[repository-name].git, replacing the bracketed parts with your actual new username and repository name.
If you use GitHub Actions, webhooks, or other automation tools that reference your old username, update those configurations now. Check any CI/CD pipelines, deployment scripts, or third-party integrations that might be hardcoded to your old username.
What happens to your repositories and history
Your repositories, stars, followers, and all contribution history move with you automatically. The only thing that changes is the URL. A repository that was at github.com/oldname/myproject is now at github.com/newname/myproject.
If someone tries to visit your old username URL during the 30-day redirect window, GitHub sends them to your new username. After 30 days, the old URL returns a 404 error, and the old username becomes available for someone else to register.
If you want to keep your old username
If you need to preserve your old username — for example, because it is part of your professional brand — you have two options. The first is to create a new GitHub account with the name you want, then transfer your repositories to it one at a time. This is slower but keeps your old username reserved.
The second option is to rename your account to something temporary, then create a new account with your original username and set it up as an organization. This is more complex and is usually only worth doing if your old username is very valuable to you.
Frequently Asked Questions
What happens to pull requests and issues after I change my username?
All pull requests, issues, and comments stay exactly where they are. The author name on old comments still shows your old username, but your profile link updates to your new username. New comments you make will show your new username.
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 after you rename. You only need to update the repository URLs in your local git configuration and any scripts that reference the old username in a URL.
Can I change my username back to the old one after 30 days?
Yes, but only if no one else has claimed it. If the 30-day redirect period has passed and someone else registered your old username, you cannot use it again. If it is still available, you can rename your account back to it anytime.
Will my GitHub Pages site break if I change my username?
If your GitHub Pages site is hosted at [username].github.io, you need to rename the repository to match your new username. The site will be temporarily unavailable until you rename the repository, then it will be live at your new username URL.
What if I see an error when I try to change my username?
The most common error is that the username is already taken. Try a different name. If you see a different error, wait a few minutes and try again — GitHub occasionally has brief delays processing username changes. If the error persists, contact GitHub Support through your account settings.