Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github shows name instead of a linked username in commits

Tags:

github

I just helped a friend to set up a Github account to collaborate on my project. His commits come through, but for some reason on the "Source" page of my repository next to his commit is only his name and not his username (with a link).

It seems strange, since Github obviously recognizes him (I added him to the list of collaborators etc.

Seems like a stupid question, but Google couldn't help.

Thanks!

like image 784
Alexei Boronine Avatar asked Nov 17 '09 04:11

Alexei Boronine


People also ask

Why are my commits linked to the wrong user?

GitHub uses the email address in the commit header to link the commit to a GitHub user. If your commits are being linked to another user, or not linked to a user at all, you may need to change your local Git configuration settings, add an email address to your account email settings, or do both.

Is my GitHub username the same as GitHub?

Git uses a username to associate commits with an identity. The Git username is not the same as your GitHub username.


2 Answers

Does your friend have the e-mail address he is using for his commits correctly set up as an alias in GitHub? Otherwise, how is GitHub to know who he is? Git itself only records the full name and the e-mail address and obviously not the GitHub username, since you can use Git perfectly fine without GitHub.

like image 54
Jörg W Mittag Avatar answered Oct 06 '22 00:10

Jörg W Mittag


Run this in Terminal:

  git config --global user.name "your-github-username"   git config --global user.email "your-github-email" 
like image 23
Shaun Avatar answered Oct 06 '22 01:10

Shaun