Home > Blockchain >  How do I register my user name properly with GitHub from Visual Studio
How do I register my user name properly with GitHub from Visual Studio

Time:10-28

I have checked out one of my GitHub repositories with Visual Studio and pushed some changes. It works fine but my username does not register properly with GitHub so the commits show up without my account icon and more annoyingly I can't click on the username to quickly get to the list of commits in a browser window.

Here is what I mean:

Github

What is the problem and how do I fix it? Oh and by the way I also installed the "Github for Visual Studio" extension and logged into that, but that did nothing.

CodePudding user response:

GitHub associates commits with your account based on the email address in the commit. If the email address in the commit doesn't match any account, then GitHub doesn't associate it with any account and displays the name in the commits, which is what you're seeing here.

You should look in the GitHub settings to see what email addresses are associated with your account and then run git config user.name and git config user.email to make sure they're set correctly. If they're not, you can change them by doing something like git config --global user.name "My Name" and git config --global user.email [email protected].

Do note that user.name is your personal name (e.g., "Pat Doe"), not a username; the Git FAQ explains this in more detail.

  • Related