Why do my GitHub commits always show as unknown author?

前端 未结 1 1454
粉色の甜心
粉色の甜心 2021-01-02 06:52

I\'ve just set up a GitHub account and pushed an initial repository. If I look at the account level, under \"Public Activity\" it\'s correct and says chriskessel pushe

相关标签:
1条回答
  • 2021-01-02 07:20

    Double check your user.email setting.
    Both user.name and user.email must be set for GitHub to pick up the right Author.

    As an example, see the "Git author Unknown" question.
    See also the blog post "GitHub: Committing code to your public repository without "Unknown" author name in commits".

    From the GitHub man page:

    Git tracks who makes each commit by checking the user’s name and email.
    In addition, we use this info to associate your commits with your GitHub account.
    To set these, enter the code below, replacing the name and email with your own. The name should be your actual name, not your GitHub username.

    $ git config --global user.name "Firstname Lastname"
    $ git config --global user.email "your_email@youremail.com"
    
    0 讨论(0)
提交回复
热议问题