Linux 提交-m在转移更改后不工作
我以前曾多次使用git,但自从我安装了新的Linux之后,我就无法提交我的更改。我一直收到这个错误:Linux 提交-m在转移更改后不工作,linux,git,github,git-commit,git-config,Linux,Git,Github,Git Commit,Git Config,我以前曾多次使用git,但自从我安装了新的Linux之后,我就无法提交我的更改。我一直收到这个错误: *** 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
*** 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 <my@mail.com>) not allowed
Git需要知道您的个人名称user.name和电子邮件地址user.email,以便在提交和标记中嵌入这些值。在您的情况下,您有一个有效的电子邮件地址,但您没有指定个人名称
您应该运行git config命令,按照上面的建议设置user.name。请注意,这不是您在任何系统上的用户名,而是您的个人姓名,例如Pat Doe或Sam Smith。凭据在任何方面都与此无关。我感谢您的帮助,但是,我仍然不断收到相同的错误。有没有办法重置全局用户名和电子邮件?请编辑您的问题,将git config-l的输出包括在内--将源代码显示为代码块。它正确显示了我的全局用户和电子邮件,并在我运行git config命令时进行更新。您是否安装了两个不同版本的git,其中一个使用/home/george/.gitconfig作为-global设置,另一个使用其他目录作为-global设置?
git config -l --show-origin
file:/home/george/.gitconfig user.email=my@mail.com
file:/home/george/.gitconfig user.name=George Lastname
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=true
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config remote.origin.url=https://github.com/mygithub/repo
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config branch.master.remote=origin
file:.git/config branch.master.merge=refs/heads/master