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 补丁