6aw72a
Last Updated: February 25, 2016
·
13.89K
· willybarro
3a1b60d475cb82990e3c44ab114fe001

Creating patch from GitHub pull request

Have you ever needed to generate a patch file from a GitHub pull request? If you answered YES, you'll enjoy this little hidden feature.

Every pull-request on GH can be downloaded as a beautiful mail-patch, just by appending ".patch" to the pr URL.

E.g., from:
https://github.com/php/php-src/pull/296

To:
https://github.com/php/php-src/pull/296.patch

This will generate a mail-formatted patch file, that is a little different from an usual patch file: It has e-mail metadata.

After downloaded, apply the result patch using:
$ git am 296.patch

Say Thanks
Respond

4 Responses
Add your response

14763
66c0cc63afb786af6c17d40198166222

THANK YOU! You made my day

over 1 year ago ·
17198
None

Thanks! That's exactly what I was looking for!

over 1 year ago ·
17506
None

Thank you! That worked great!

over 1 year ago ·
20772
Ariel caplan pic

Just what I needed today, thank you!

over 1 year ago ·
Filed Under

Awesome Job

E20ce6a2 ca1f 11e7 82be 7f617c8310c9
SENIOR DEVELOPER (m/w)
·
Berlin, Köln, Hamburg, München
·
Full Time