【问题标题】:some error occured when commit My project to github将我的项目提交到 github 时发生了一些错误
【发布时间】:2018-06-24 12:56:43
【问题描述】:

我是 github 的新手。我试图提交我的项目。但在我的 cmd 上发生了以下错误。

*** 请告诉我你是谁。

运行

git config --global user.email "you@example.com" git config --global user.name "你的名字"

设置您帐户的默认身份。 省略 --global 以仅在此存储库中设置身份。

致命:无法自动检测电子邮件地址(得到 'Hema@Hema-PC.(none)')

如何解决这个问题?

【问题讨论】:

标签: git github


【解决方案1】:

对于这个错误你只需要执行他们显示的命令

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

这会在 ~/.gitconfig 中设置你的名字。

【讨论】:

  • 我需要更多解释实际上我对 git 很陌生
  • git config 将编辑你的配置所以为了保存你的提交 git 必须知道它是谁。 Theres 命令只会将信息添加到主配置文件中,以便 git 知道谁在这台计算机上使用他。之后当地人会知道你是谁。你只需要添加你的文件(git add file.txt)并提交(git commit -m“Message”),然后你就可以将它推送到github(git push)
  • @Hema 该错误非常明确地解释了您需要做什么;)
猜你喜欢
  • 1970-01-01
  • 2021-12-21
  • 2021-11-16
  • 2014-08-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-13
  • 2016-10-26
相关资源
最近更新 更多