我是 SmartGit 的新手。我无法通过我的存储库提交,我收到的消息是:
Unable to auto-detect email address (got 'Arreane@Arreane-PC.(none)')
*** 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
我使用的是另一台 PC,但如果我在家里提交,它会完美提交和推送,我不知道这是否是问题的原因。
我四处搜索,其他人说要编辑 .git/config
文件,但我找不到这个文件。
我错过了什么?
最佳答案
好吧,这条消息几乎是不言自明的。你没有告诉 git 你的名字和电子邮件地址是什么。
打开命令行并输入:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
当然你应该输入你的真实姓名和电子邮件。 之后 git 知道你是谁,并能够在你的提交中插入此信息。
似乎 smartgit 没有将 git 二进制文件添加到您的路径中。您必须将其路径添加到 PATH 环境变量或首先更改到相应的目录。您可以在此处找到截屏视频:http://blog.dragndream.com/?p=97
关于git - 无法自动检测电子邮件地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16433970/