git - 无法自动检测电子邮件地址

标签 git git-config smartgit

我是 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/

相关文章:

git - Git SVN 忽略路径如何工作(忽略每日构建标签)?

git - 什么是反向 merge

Git:cherry pick 插入来自其他提交的更改

Github远程: Invalid username or password.致命:身份验证失败

git - 如果它是分支中唯一的提交,我该如何删除第一个也是唯一的提交?

git - 如何在 Azure DevOPS 服务器上使用 PAT 克隆 git 存储库

git - SmartGit:彩色复选框的含义

git - 如何传递文件名参数 gitconfig diff textconv?

git - 默认的 git 配置文件应该包含什么?

git - 如何使用旧的 SSH key 从 Windows 到 Ubuntu?