Git:发送电子邮件而不提交
我有一个项目,我在其中进行了更改,并希望使用 git send-email 功能将它们发送给另一个用户。
我发现它通过发送补丁(由每次提交的 git format-patch 创建)来工作。
它能够只发送 diff
的吗?我不想先提交,然后发送补丁。
git format-patch
或 send-email
是否有一些参数可以快速完成此操作?
提前致谢。
I have a project where I made changes, and want to send them to another user, using git send-email feature.
I found that it works by sending patches (created by git format-patch
of each commit).
Is it able to send just diff
's ? I don't want to commit first, and then send the patch.
Does git format-patch
or maybe send-email
have some parameter to just do that quickly?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明这是不可能的。所以我提交并尝试
send-email
它,这会引发错误此错误与我的 smtp 服务器不支持身份验证有关。
为了解决这个问题,我对
.gitconfig
中显示smtpuser,
的行进行了注释,这样它就不会向 git 传递任何用户或密码。然后,电子邮件就可以顺利发送。但我仍然认为应该有一个使用
send-email
功能的选项,发送补丁而不必先提交它。It turns out not to be possible. So I commited and tried to
send-email
it, which throws an errorThis error is related to my smtp-server not supporting authentication.
To solve this, I commented the line in my
.gitconfig
where it sayssmtpuser,
so that it doesn't pass any user or password to git. Then, the email gets sent without a problem.But I still think that should have an option to use
send-email
feature, sending a patch without having to commit it first.