开发者

Github shows name instead of a linked username in commits

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!


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.


Run this in Terminal:

  git config --global user.name "your-github-username"
  git config --global user.email "your-github-email"


Add the email used in the git commits to github via Account Settings: Email Settings


Just ask your friend to add email that he use in local git commits to his GitHub account emails list as stated in GitHub Help


you can check the GitHub article:

$ git config --global user.name "example"

$ git config --global user.email "email@example.com"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜