2017-08-01 115 views
0

每当我尝试提交文件到Github上我得到以下错误:错误commiting文件到GitHub上

[email protected] MINGW64 ~/HTML-CSS-and-JS---coursera/site (master) 
$ git commit -m "Homepage" 

*** Please tell me who you are. 

Run 

    git config --global user.email "[email protected]" 
    git config --global user.name "Your Name" 

to set your account's default identity. 
Omit --global to set the identity only in this repository. 

fatal: unable to auto-detect email address (got '[email protected](none)') 

这是FRST时候我尝试这样做。我刚刚在coursera上开了一门课程,我完全按照视频中的做法做了一切,到现在为止每个节目都很顺利。我该如何解决?任何人都可以帮助我,提前致谢!

P.S:我正在使用Windows。

回答

1

Git在提交资源库时总是需要标识。它使用的标识是您的姓名或电子邮件地址。这将用于显示属于Git历史记录中的用户的提交。以上输出已经向您显示了您需要执行的操作。运行下面的命令,填写您的姓名和电子邮件地址。

git config --global user.email "Your email"
git config --global user.name "Your Name"

在此之后,你应该可以提交给git。

+0

几分钟前,我终于明白了,我感到很愚蠢。不过,非常感谢! –