Where to find the username setting and what happens when you change it

GitHub lets you change your username from your account settings page, and the process takes about two minutes. When you change it, GitHub automatically redirects your old profile URL to your new one, so links people shared before the change still work. However, your repositories keep their old web addresses unless you rename them individually — that is a separate step.

The change takes effect when ready. Anyone who tries to visit your old profile URL will be sent to your new one automatically. If you have a GitHub Pages site (the free website GitHub hosts for you), that URL changes too, so you will need to update any links you have shared elsewhere.

Key Takeaways

  • Go to Settings, then Account, then change the username field and click Update.
  • GitHub redirects your old profile URL to your new one, so old links still work.
  • Repository URLs do not change automatically — you must rename each one separately if you want the new username in the web address.
  • If you have a GitHub Pages site, its URL changes and you need to update any links you published elsewhere.
  • You can change your username back to a previous one, but only if nobody else has claimed it in the meantime.

Step 1: Sign in and open your account settings

Log into GitHub with your current username and password. In the top right corner of any page, click your profile picture, then click Settings from the dropdown menu that appears.

You will land on the Profile tab. Look for the left sidebar — it lists several options including Profile, Account, Emails, and others. Click Account.

Step 2: Find and edit the username field

On the Account page, scroll down until you see the Change username section. The current username appears in a text field. Click inside the field and delete the old name, then type your new username.

GitHub shows you right away whether the new name is available. If it is taken, you will see a red X and a message saying the username is unavailable. If it is free, you will see a green checkmark. Choose a name that is not claimed before you move to the next step.

Step 3: Confirm the change and understand what GitHub will do

Below the username field, GitHub displays a warning that explains what will happen. It tells you that your old profile URL will redirect to the new one, but that repository URLs will not change. Read this carefully so you understand what to expect.

Click the Update button to save the change. GitHub processes it when ready — there is no confirmation email or waiting period.

Step 4: Update repository URLs if you want the new username in them

Your repositories still have their old web addresses. If you want them to show your new username in the URL, you must rename each repository separately. Go to each repository, click Settings, scroll to the Repository name field, and change it there.

Renaming a repository does not break existing clones on your computer — Git will still work. However, if you have shared the repository URL with others, they will need to update their bookmarks or links.

What to do if you have a GitHub Pages site

If you use GitHub Pages to host a website, the site's URL changes when you change your username. A site at oldusername.github.io becomes newusername.github.io. Update any links you have published on other websites, in email signatures, or in documentation.

The content of your site does not change — only the address. If you have a custom domain pointing to your GitHub Pages site, the custom domain still works and you do not need to change anything there.

Changing your username back or undoing the change

You can change your username again at any time by going back to Settings > Account > Change username. However, once you change away from a username, you cannot claim it again unless nobody else has taken it in the meantime. If someone else has claimed your old name, you will have to choose a different one.

GitHub does not have a way to "undo" a username change to restore the old name if it is taken. Plan your new username carefully, especially if you think you might want to switch back later.

Frequently Asked Questions

Do I lose my repositories or contributions when I change my username?

No. Your repositories, commit history, and all your contributions stay with your account. The change only affects the web address where people can find your profile and repositories. Your account itself remains the same.

Will my old GitHub profile URL still work after I change my username?

Yes. GitHub automatically redirects your old profile URL to your new one. Anyone who visits your old profile page will be sent to the new one. This redirect is permanent and requires no action from you.

What happens to links I shared before changing my username?

Links to your profile will still work because of the automatic redirect. However, links to individual repositories will not redirect — they will show a 404 error unless you rename the repositories to match your new username.

Can I change my username if I have two-factor authentication enabled?

Yes. Two-factor authentication does not prevent you from changing your username. You will still need to pass your two-factor check to access Settings, but the username change process itself is the same.

How long does it take for the username change to take effect?

The change is when ready. Your new username works right away, and the redirect from your old profile URL starts working when ready. There is no processing time or delay.