Signup/Sign In

How To Change Your GitHub Username

Posted in General   SEPTEMBER 22, 2021

    GitHub Logo

    Your Github login username could be changed to another username that is not in use. You might have to consider some unique usernames if the username you want is not available. You can use the different signs like hyphens, numbers, or alternative spellings to get a similar username that is still available.

    Your old GitHub login username can be claimed by anyone after you have changed your username. Except for some links to your profile that wouldn't redirect automatically, most of the other references to your repositories that were under the old username are changed automatically to the new username.

    Redirects cannot be set up for:

    • @mentions that use your old username
    • The links to gits that include your old username

    Steps To Change Your Github Login Username

    Change username GitHub

    1. First, click your profile photo, then click Settings.
    2. In the left sidebar, click Account.
    3. Under the "Change username" section, click on Change username.
    4. Make sure that you read the warnings about changing your username and then click I understand, let's change my username.
    5. Type a new username.
    6. Make sure that the username that you have chosen is available and then click Change my username.

    Where To Make Changes

    Making changes GitHub

    1. Go to the GitHub account settings and change the username.
    2. If you are using GitHub Pages, you could just change the name of your “username.github.io” repository
    3. Other services that point to your “username.github.io” repository address should now be updated.
    4. You might want to sign in and reconnect your repositories when using Netlify.
    5. You can sign in to Travis CI and other integrations as it will update your username there.
    6. Make sure that your local files and repository links are updated and the changes to GitHub are pushed back.
    7. With your updated GitHub link redeploy any websites that you may have.
    8. You can then fix any links around the web to your profile, Gists, or your repositories.

    Local File Updates

    We have for you some suggestions for strings, which you can use to search and replace your username.

    • github.com/username ( you get the references to your GitHub page in READMEs or in website copy)
    • username.github.io ( you will get links to your GitHub Page)
    • git@github.com:username ( you get Git config remote ssh URLs)
    • travis-ci.com/username (Travis badges in READMEs)
    • shields.io/github/.../username ( the shield badges would be in READMEs, types include stars, tags, contributors, and more)

    You can use this command for each string after you identify where the above strings are located:

    grep -rnw -e 'foobar'

    It will search all files for strings matching the whole (w) pattern (e) recursively (r) provided and prefix results with the line numbers (n) so you can find them easily.

    About the author:
    Expert technical writer who simplifies complex technological concepts for lay audiences. Focused on providing insightful analysis and entertaining listicles on a wide variety of topics in the technology sector.
    Tags:howtogithub
    IF YOU LIKE IT, THEN SHARE IT
     

    RELATED POSTS