玩游戏(githug)学习git时遇到的错误---设置全局name和email

这些是githug常用的命令:

githug: 开始闯关或进入下一关
githug hint: 过关提示
githug levels: 显示关卡列表
githug reset [关卡名]: 重启本关或者重启到指定关卡名的关卡

关卡4原文:

e:\githug\git_hug>githug
*********************************************************
*                                    Githug             *
*********************************************************

Name: commit
Level: 4
Difficulty: *

The `README` file has been added to your staging area, now commit it.

过这关的时候错误,信息如下:

e:\githug\git_hug>git commit -m "add README"

*** 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 'Administrator@hao.(none)')
由于第2关时我设置name和email时用的是本地参数,如下,所以错误。

在这里插入图片描述

当我改为全局参数再设置一遍时,就可以提交暂存区的文件啦

啊偶

至于原因嘛

好吧,我也不知道,所以,请各位大佬不吝赐教
文章若有错误,请多多指教。
发布了179 篇原创文章 · 获赞 20 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/ExclusiveName/article/details/104849953