IN SHORT
是否有可能创建一个存储(使用git stash create
) without需要配置user.email
and user.name
?类似的东西git commit --author
选项?
一些背景:
我有几台构建机器,上面有一个构建用户。每个人都可以访问中央 git 存储库。不过我还没有配置过user.email
and user.name
对于每个用户;因为他们永远不需要做出承诺。
在我使用的一个脚本中
git stash create
(这允许我使用 git archive --format-gtz ...我就不详细介绍了;请参阅我的相关问题 https://stackoverflow.com/questions/23115777/git-archive-with-unstaged-changes)
然而这个命令失败了:
*** Please tell me who you are.
Run
git config --global user.email "[email protected] /cdn-cgi/l/email-protection"
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 <[email protected] /cdn-cgi/l/email-protection>) not allowed
Cannot save the current index state
PS:我有git 1.8.4
使用 Git 的-c
flag,配置参数可以在命令行传递:
git -c user.name=test -c [email protected] /cdn-cgi/l/email-protection stash create
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)