git commit 补丁_如何为特定的git commit生成补丁文件?

git commit 补丁

How to produce a patch file for a specific git commit so that the changes in that commit can be emailed/sent?

如何为特定的git 提交生成补丁文件,以便可以通过电子邮件发送/发送该提交中的更改?

git show 550a38b52

generate a quite close content while it is not exactly a patch.

生成的内容非常接近,而并非完全是补丁。

You can use this command

您可以使用此命令

git format-patch -1 550a38b52

It will generate a file like 0001-<commit-title>.patch in the current directory.

它将在当前目录中生成一个类似于0001-<commit-title>.patch的文件。

The common commit id and string can be used such as HEAD.

可以使用常见的提交ID和字符串,例如HEAD

For how to apply the patch,

有关如何应用补丁,

patch -p1 < 0001-commit-title.patch

翻译自: https://www.systutorials.com/how-to-produce-a-patch-file-for-a-specific-git-commit/

git commit 补丁

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值