Git Can';不要提交新文件
我在Chromebook上使用Linux操作系统。我在学Java。我从GitHub下载了一个存储库。它缺少.gitignore文件,所以我创建了它并尝试提交它,但我收到一条消息Git Can';不要提交新文件,git,Git,我在Chromebook上使用Linux操作系统。我在学Java。我从GitHub下载了一个存储库。它缺少.gitignore文件,所以我创建了它并尝试提交它,但我收到一条消息 $ git commit -m "I've created .gitignore file" *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global us
$ git commit -m "I've created .gitignore file"
*** 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: empty ident name (for <(null)>) not allowed
但当我键入我的名字时,我会收到一条消息:
error: key does not contain a section: Name Surname
我做错了什么?您运行的是没有双顶点的
git config--global user.name“Your name”
,如下所示:
git config --global user.name my name and username
像这样跑
git config --global user.name "my name and username"
你打字了
$ git config --global "my_GitHub_account_email@gmail.com"
$ git config --global "Name Surname"
您忘记了user.name
和user.email
必须键入的命令有:
$ git config --global user.email "my_GitHub_account_email@gmail.com"
$ git config --global user.name "Name Surname"
你能用你键入的实际命令更新你的问题吗?你能看一下你的.gitconfig,看看它的格式是否正确吗?$cat.gitignore/bin/.idea/*.classpath*.project**.imlI以前从未使用过Linux系统,我所做的一切都是通过谷歌搜索得到的。我遵循了课程视频中的所有步骤。我还尝试创建了一个文本文件le,abc.txt。它仍然会带来相同的错误。可能会重复
$ git config --global user.email "my_GitHub_account_email@gmail.com"
$ git config --global user.name "Name Surname"