发送电子邮件而不提交

发送电子邮件而不提交

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

问题描述

我有一个项目,在其中进行了更改,并希望使用git send-email功能将其发送给另一个用户.

I have a project where I made changes, and want to send them to another user, using git send-email feature.

我发现它可以通过发送补丁(由每次提交的 git format-patch 创建)来起作用.

I found that it works by sending patches (created by git format-patch of each commit).

是否可以仅发送 diff 的?我不想先提交,然后发送补丁.

Is it able to send just diff's ? I don't want to commit first, and then send the patch.

git format-patch send-email 是否有一些参数可以快速完成?

Does git format-patch or maybe send-email have some parameter to just do that quickly?

谢谢.

推荐答案

事实证明这是不可能的.所以我提交并尝试 send-email 它,这会引发错误

It turns out not to be possible. So I commited and tried to send-email it, which throws an error

此错误与我的smtp服务器不支持身份验证有关.

This error is related to my smtp-server not supporting authentication.

为解决此问题,我在我的 .gitconfig 中注释了该行,该行显示 smtpuser ,这样它就不会将任何用户或密码传递给git.然后,电子邮件发送就没有问题了.

To solve this, I commented the line in my .gitconfig where it says smtpuser, so that it doesn't pass any user or password to git. Then, the email gets sent without a problem.

但是我仍然认为应该有使用 send-email 功能的选项,无需先提交便发送补丁.

But I still think that should have an option to use send-email feature, sending a patch without having to commit it first.

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

08-15 17:10