简而言之
使用git stash create
创建一个存储区,是否有可能不需要配置user.email
和user.name
?类似于git commit --author
选项?
一些背景:
我有几台构建机器,每台都有一个构建用户,并且可以访问中央git代码库。但是,我没有为这些用户的每个用户配置user.email
和user.name
,因为他们从未需要进行提交。
在我的其中一个脚本中,我使用
git stash create
(这使我可以使用git archive --format-gtz...我会省略细节, 可以查看我相关的问题)。
然而,这个命令失败了:
*** 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 <macq@chmalap.macqel>) not allowed
Cannot save the current index state
PS:我有git 1.8.4
git stash
将容忍缺失的用户身份。请参见下面的答案。 - VonC