美文网首页
Git第一次git commit提交时遇到 unable to

Git第一次git commit提交时遇到 unable to

作者: 欧德朗 | 来源:发表于2018-07-04 15:41 被阅读0次

2018-07-04
创建文件夹 mkdir xxx
把这个文件夹变成git库 git init
随便创建新文件 touch haha.txt

然后git add haha.txt

git commit -m" first"这一步的时候报错:

** 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)')

解决方案

命令行 ll 输出所有文件 找到隐藏文件 .git
进入.git 目录找到config文件
再最后面添加

[user]
email=laochangbike@163.com
name=chy

问题解决

相关文章

网友评论

      本文标题:Git第一次git commit提交时遇到 unable to

      本文链接:https://www.haomeiwen.com/subject/orieuftx.html