git commit -m “” 指令报错的解决方法
错误信息:
Author identity unknown
*** 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 'zhaow@ZwzzzLapTop.(none)')
(base)
问题:在正式使用Git前,需要一些全局设置
$ git config --global user.name "Weizhi-Zhao"
bash: $'\302\203git': command not found
出现这个问题可能因为有多余的空格
$ git config --global user.name "Weizhi-Zhao"
运行成功
$ git config --global user.email "xxx@xx.xx"
运行成功
再次运行
$ git commit -m "happy summer holiday"
[master (root-commit) 41f61f4] happy summer holiday
1 file changed, 1 insertion(+)
create mode 100644 lala.txt
运行成功