【问题标题】:Patch file includes the git version at the end补丁文件最后包含 git 版本
【发布时间】:2020-03-14 19:19:48
【问题描述】:

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 patch


    【解决方案1】:

    使用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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-21
      相关资源
      最近更新 更多