How to produce a patch file for a specific git commit?
Posted on In QA, TutorialHow to produce a patch file for a specific git commit so that the changes in that commit can be emailed/sent?
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.
The common commit id and string can be used such as HEAD
.
For how to apply the patch,
patch -p1 < 0001-commit-title.patch