2017-08-01 173 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

幾分鐘前,我終於明白了,我感到很愚蠢。不過,非常感謝! –