Where to find the username setting

Log into GitHub and click your profile picture in the top right corner. Select Settings from the dropdown menu. On the left sidebar, click Account. You will see a field labeled Username near the top of the page — this is where you make the change.

GitHub displays your current username in that field. Next to it is a button that says Change username. Click that button to unlock the field for editing.

Key Takeaways

  • You reach the username setting through your profile picture menu, then Settings, then Account on the left sidebar.
  • GitHub warns you that changing your username will break old repository links, but redirects those links automatically for 300 days.
  • Your new username must be between 1 and 39 characters, contain only letters, numbers, and hyphens, and cannot start or end with a hyphen.
  • After you change your username, GitHub sends a confirmation email and the change takes effect when ready.
  • Any links you have shared to your old profile or repositories will still work during the 300-day redirect period, but you should update them yourself if they are in important places.

What GitHub requires in a new username

Your new username must follow specific rules. It can be 1 to 39 characters long and can only contain letters (a–z, A–Z), numbers (0–9), and hyphens (-). Usernames cannot start or end with a hyphen, and GitHub will not let you use a hyphen as your entire username.

GitHub checks whether your desired username is already taken. If someone else has claimed it, you will see an error message and cannot proceed. You also cannot use a username that is reserved by GitHub itself — for example, you cannot use "admin" or "api" as your username.

Entering your new username and confirming the change

Type your new username into the field. As you type, GitHub shows you whether the name is available. Once you have entered a username that is not taken and meets the character rules, a Change username button appears below the field. Click it to proceed.

GitHub will ask you to confirm the change by typing your password. This is a security step to make sure you are the account owner. Enter your password and click Confirm password. The change takes effect when ready after confirmation.

What happens to your old links and repositories

When you change your username, GitHub automatically redirects your old profile URL and all your repository URLs to your new username for 300 days. This means links you shared before the change will still work during that period — they will straightforward forward to your new profile and repositories.

However, you should update any links that are in important places, such as your resume, portfolio website, or social media profiles. After 300 days, the old links will no longer redirect. If someone tries to visit your old profile URL after that period, they will see a 404 error.

Updating your local Git repositories

If you have cloned repositories to your computer and pushed changes to them, you should update the remote URL in your local Git configuration. Open a terminal or command prompt and navigate to the repository folder. Run this command to see your current remote URL:

git remote -v

If the URL contains your old username, update it by running:

git remote set-url origin https://github.com/[new-username]/[repository-name].git

Replace [new-username] with your new GitHub username and [repository-name] with the name of the repository. This step is not required for the change to work — GitHub's redirect will handle it — but updating your local configuration prevents confusion later.

Reverting your username if you change your mind

You can change your username again at any time by returning to the same Settings page and clicking Change username again. GitHub does not limit how many times you can change it. However, if you want to use your old username again, you must wait until no one else has claimed it in the meantime.

If someone else has taken your old username, you will need to contact them to ask if they will release it, or you will need to choose a different name. GitHub does not hold old usernames in reserve for previous owners.

Frequently Asked Questions

Will changing my username affect my GitHub contributions or commit history?

No. Your contributions, commit history, and all your repositories remain exactly the same. The change only affects the username that displays on your profile and in URLs. Your past commits will still show your old username because they are part of the permanent commit record, but your profile and repository pages will show your new username.

What if I see an error message saying the username is unavailable?

The username is either already taken by another user or it is reserved by GitHub. Try a different username. If you are certain the name should be available, wait a few minutes and try again — sometimes there is a brief delay in GitHub's system. If the problem continues, contact GitHub Support through your account settings.

Do I need to update my SSH keys or personal access tokens?

No. Your SSH keys and personal access tokens are tied to your account, not your username. They will continue to work after you change your username. You do not need to regenerate or update them.

Can I change my username if I have a GitHub Organization?

Yes, you can change your personal username even if you own or belong to an organization. The organization name is separate from your personal username and will not be affected. However, if you want to change the organization name itself, that is a different process done through the organization settings.