今天在Giithub客户端提交代码,老是出现这个错误,经过查资料,错误的解决方法如下。
ommit failed - exit code 128 received, with output: '*** 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 'Administrator@w310-002.(none)')'
解决方法:
在项目的根目录下有一个隐藏文件夹–.git,里面有一个config文件,利用记事本或什么什么的打开它,在文件的最后添加下面的代码:
xxx换成自己的名字和邮箱地址,然后保存文件,再去提交OK啦!
[user]
name = xxx
email = xxx