問題描述:
使用git commit -m "wrote a readme file",就遇到了這個問題
** Please tell me who you are.
Run
git config --global user.email "you@example.com"
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 'tim@newton.(none)')
解決辦法:
找到工程目錄的.git文件夾,打開之后找到config文件,在最后邊添加如下信息:
[user]
email=your email
name=your name
注:你可能會找不到工程目錄下的.git文件,那是因為這個目錄默認是隱藏的,我們將它顯示就闊以了。