Git提交没有电子邮件 [英] Git commit with no email

查看:800
本文介绍了Git提交没有电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在将一个svn仓库转换成一个git仓库。当我手动进行时,我会定期更改user.name和user.email以设置提交的作者。一切似乎都正常,但现在我必须从没有电子邮件地址的用户提交一些东西。我从.gitconfig文件中删除了电子邮件属性并尝试了,但是在git日志中,电子邮件字段显示 user_login @ user_login。(none)。是否有可能不设置电子邮件并阻止git猜测其中一个?

解决方案

我认为您只能使用明确的作者规范:

  git commit --author蜗牛邮件<> 

您需要尖括号,以便git知道您确实传递了一个空的电子邮件地址。 p>

I'am currently converting a svn repository into a git one. As I proceed manually, I regularly change the user.name and user.email to set the author of the commit. Everything seems to work fine, but now I have to commit something from a user which has no email address. I removed email property from .gitconfig file and tried, but then in git log, email field shows user_login@user_login.(none). Is it possible to set no email and prevent git guessing one ?

解决方案

I think that you can only do this with an explicit author specification:

git commit --author "Snail Mail <>"

You need the angle brackets so that git knows that you really are passing an empty email address.

这篇关于Git提交没有电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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