本文介绍了使用git send-email发送电子邮件时如何添加其他文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 git send-email< patch-name> 发送补丁.

我希望随补丁一起发送的电子邮件在顶部除了提交消息外还添加一些其他文本.

I want that the email sent with the patch to have some additional text added at the top, besides the commit message.

有什么办法吗?

推荐答案

您可以使用-annotate ,然后在两个 --- 之间添加注释补丁,它不会影响补丁.

You can use --annotate, then just add your comment between the two --- of the patch, it won't affect the very patch.

引用: https://kparal.wordpress.com/2011/08/03/git-tip-of-the-day-introduction-text-when-emailing-patches/

例如:

From 7ea3c50fa83950549de11c6834c465bc8f28b52b Mon Sep 17 00:00:00 2001
From: James Laska
Date: Mon, 1 Aug 2011 09:53:16 -0400
Subject: [PATCH] compose_tree - Save the setup.sh script for later debugging

---
This patch is really really important, because otherwise the 
world will end in 2012. Please accept it.

 tests/compose_tree/compose_tree.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/compose_tree/compose_tree.sh b/tests/compose_tree/compose_tree.sh
index 66ecefd..c2e041d 100755
--- a/tests/compose_tree/compose_tree.sh
+++ b/tests/compose_tree/compose_tree.sh
... (the rest of the patch)

这篇关于使用git send-email发送电子邮件时如何添加其他文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 14:46