0

在一个项目上工作,我正在混合 Netbeans 7.3 集成 git 客户端(实际上是 jgit)和命令行 git 客户端。
使用 Netbeans 提交时,IDE 提供两个字段:AuthorCommitter.

在此处输入图像描述

但是当通过命令行处理同一个项目时,我得到:

$git commit

*** 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 'agostinox@local-pc.(none)')

一致地,git config --list返回一组不包含 user.email 或 user.name 的键。

添加reuqired的信息很容易,但问题是:由于eamil地址的自动检测失败,即之前使用的电子邮件地址,Netbeans(jgit)执行成功提交?

4

1 回答 1

1

查看使用了什么的最佳方法可能是查看git log --pretty=fuller. 由上述判断,jgit 可能被允许agostinox@local-pc作为电子邮件地址。

顺便说一句,这里的区别可能是 git 对它找到的电子邮件地址不满意(local-pc不是正确的域名)。jgit 只是有不同的政策并接受它。

于 2013-08-15T13:39:12.060 回答