SysTutorials Forums QA How to produce a patch file for a specific git commit?

Tagged: 

How 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
Reply To: How to produce a patch file for a specific git commit?
Your information:





<a href="" title="" rel="" target=""> <blockquote cite=""> <code> <pre> <em> <strong> <del datetime=""> <ul> <ol start=""> <li> <img src="" border="" alt="" height="" width="">

Please share if you like this post: