What happens when you change your GitHub username

GitHub lets you change your username once, and the old name becomes available for someone else to claim after a grace period. Your repositories, profile, and contribution history stay with your account — they don't disappear. But any links to your old profile or repositories will break, and anyone who bookmarked your work or linked to it from elsewhere will land on a 404 page.

The change takes effect when ready. If you use GitHub for work or have shared your profile URL with collaborators, employers, or in a portfolio, you'll need to update those links yourself. GitHub doesn't notify people who follow you or have starred your repositories.

You can only change your username once every seven days, so choose carefully before you submit.

Key Takeaways

  • Your username change takes effect right away, but any old links to your profile or repositories will stop working.
  • You can change your username once every seven days, so plan ahead if you've already changed it recently.
  • Update your local Git configuration on your computer so your commits continue to be attributed to your account.
  • Search for your old username across your website, resume, portfolio, and any documentation that links to your GitHub profile.
  • If you use GitHub Pages, your site URL will change if it was built on your username — you'll need to update the repository name and settings.

Steps to change your username

Step 1: Sign in and open settings. Go to github.com and sign into your account. Click your profile photo in the top right corner, then select Settings from the dropdown menu.

Step 2: Find the account settings page. In the left sidebar, click Account. You'll see a section labeled Change username near the top of the page.

Step 3: Enter your new username. Type the new name you want. GitHub will tell you right away if it's already taken or if it contains characters that aren't allowed. Usernames can contain letters, numbers, hyphens, and underscores, but they can't start with a hyphen or end with a hyphen.

Step 4: Confirm the change. Click the button to confirm. GitHub will show you a warning that old links will break. Read it, then click again to proceed.

Step 5: Update your local repositories. On your computer, open the terminal or command prompt and navigate to each repository folder. Run git config user.name "Your New Username" to update the name Git uses for new commits. This doesn't change past commits, but it ensures future work is attributed correctly.

Update links across your digital presence

After you change your username, search for the old one across anywhere you've shared it. Check your personal website, LinkedIn profile, resume, portfolio site, and any documentation or README files you've written. Replace the old GitHub URL with the new one.

If you have a GitHub Pages site, the URL will change if your site was built using your username in the repository name. For example, if your old repository was oldusername.github.io, you'll need to rename it to newusername.github.io in your repository settings. Update any links you've shared that point to the old Pages URL.

Check any third-party services that connect to your GitHub account — tools like continuous integration platforms, code review services, or deployment tools may have cached your old username. Log into those services and update your GitHub connection if needed.

What breaks and what doesn't

Your repositories, stars, followers, and contribution graph all stay with your account. The green squares on your profile that show your commit history won't disappear. Any issues, pull requests, or discussions you've participated in will still show your new username.

What breaks: direct links to your old profile (github.com/oldusername), links to your old repositories (github.com/oldusername/repo-name), and any GitHub Pages site that used your username in the URL. If someone tries to visit those old links, they'll see a 404 error or be redirected to a generic page.

If you've published packages to npm, PyPI, or other registries and linked them to your GitHub account, check those registries to see if they display your GitHub username. Some will update automatically; others may show your old name until you manually update it.

If you need to use your old username again

GitHub holds your old username for 90 days before making it available to others. If you change your mind within that window, you can change back to your old username without waiting the seven-day cooldown. After 90 days, someone else can claim it.

If your old username was claimed by someone else and you want it back, you'll have to wait for them to change their username or for GitHub to reclaim it (which happens only in rare cases of abuse). There's no way to request that GitHub force a username transfer.

Updating collaborators and team members

If you work on shared repositories with other people, let them know you've changed your username. They don't need to do anything on their end — their local copies will still work — but if they've bookmarked your profile or have documentation that references your old username, they should update those links.

If you're part of an organization on GitHub, your username change doesn't affect your membership or permissions. The organization will show your new username in its member list automatically.

Frequently Asked Questions

Will my commits show under my new username?

Past commits will still show your old username because they're part of the repository history. New commits will show your new username once you update your local Git configuration. If you want past commits to show your new name, you'd have to rewrite the repository history, which is complex and not recommended for shared repositories.

What if I change my username and then want to change it back?

You can change back to your old username within 90 days without waiting the seven-day cooldown. After 90 days, your old username becomes available to anyone, and you'd have to wait seven days between any future changes.

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'll continue to work after you change your username.

Will my GitHub Pages site break if I change my username?

If your Pages repository is named username.github.io, yes — the URL will change. You'll need to rename the repository to match your new username. If your Pages site uses a custom domain, it won't be affected.

Can I change my username more than once?

You can change it once every seven days. If you've already changed it recently, you'll see a countdown timer telling you when you can change it again.