补丁文件末尾包含 git 版本

Patch file includes the git version at the end

git format-patch 将 git 版本放在末尾,如下所示:

From b2df28155560c68772063df3b3250d811e66f35e Mon Sep 17 00:00:00 2001
From: Prem Sichanugrist <prem@example.com>
Date: Mon, 25 Jan 2016 18:18:38 -0500
Subject: [PATCH 1/2] Update build matrix

Build Appraisal against these versions of Ruby

... snip ...

---
 .travis.yml | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6b56084..52d0bff 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,12 +3,12 @@ sudo: false
 before_install: gem install bundler

 rvm:
-  - 1.8
-  - 1.9
-  - 2.0
-  - 2.1

... snip ...

--
2.7.0

此补丁复制自https://thoughtbot.com/blog/send-a-patch-to-someone-using-git-format-patch

我们如何抑制这个,它只是生成补丁文件的 git 版本?

--
2.7.0

使用git format-patch --no-signature标志:

       --[no-]signature=<signature>
           Add a signature to each message produced. Per RFC 3676 the signature is separated from the
           body by a line with '-- ' on it. If the signature option is omitted the signature defaults
           to the Git version number.