git create stash无需配置user.email和user.name(git stash --author?) [英] git create stash without need to configure user.email and user.name (git stash --author ?)

查看:113
本文介绍了git create stash无需配置user.email和user.name(git stash --author?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

穿着短裤

是否可以创建存储(使用git stash create)而无需配置user.emailuser.name?类似于git commit --author选项吗?

Is there a possibility to create a stash (using git stash create) without the need to configure user.email and user.name? Something similar to the git commit --author option?

某些上下文:

我有几台构建机器,在这些机器上有构建用户.每个都有访问中央git存储库的权限.但是,我没有为每个用户配置user.emailuser.name.因为他们不需要提交.

I have several build machines on which I have a build user. Each has acces to the central git repositories. However I haven't configured user.email and user.name for each of those users; since they never need to make commits.

在我使用的一种脚本中

git stash create

(这使我可以使用git archive --format-gtz ...,我将为您省去细节;请参阅我的

(which allows me to use git archive --format-gtz ... I'll spare you the detail; see my related question)

但是此命令失败:

*** 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

PS: I have git 1.8.4

推荐答案

带有git -c标志的配置参数可以在命令行中传递:

With the git -c flag configuration parameters can be passed on the command line:

git -c user.name=test -c user.email=test@test.com stash create

这篇关于git create stash无需配置user.email和user.name(git stash --author?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆