使用git send-mail的方法
我们工作过程中可能需要提patch到公司或者社区的mail list,但是如果使用一些邮件客户端可能存在patch格式错乱等问题,所以推荐使用git send-mail这个工具。
- 安装
send-mail
的工具sudo apt install send-email
- 配置个人的
git config(~/.gitconfig)
信息,以个人的163的企业邮箱为例[user] email = xxxxx@xxxxxx name = xxxxx [core] editor=vim [sendmail] smtpserver = smtp.qiye.163.com smtpencryption = ssl smtpserverport = xxx smtpuser = xxxxx@xxxxxx
- 测试,例如寄给自己,cc给自己
git send-email --smtp-debug=1 --thread --compose --suppress-from --suppress-cc=all --to="myself <myself@myself.cn>" --cc="<myself@myself.cn>" 0001-xfs-Fix-deadlock-between-AGI-and-AGF-with-RENAME_WHI.patch
可以看到已经成功发送出去了
注意:如果是私有path 记得加上 --suppress-from --suppress-cc=all要加上,不然会寄给社群
参考链接:
https://www.cnblogs.com/haoxing990/p/12150603.html
https://git-scm.com/docs/git-send-email#Documentation/git-send-email.txt---subjectltstringgt
test
1111
111
test
asdfasdf
11111