GitHub Commits in Patch Format

Today I present a simple tip. Recently I wrote about how I handle pull requests on GitHub. When people send me a pull request of additions/fixes for a project I prefer to add .patch to the end of URLs for those pull requests and feed the output into the git am command.

Earlier I was looking at a pull request that contained only a single commit I wanted to use. GitHub provides URLs to individual commits, so I thought, “Can I add .patch to the end of those URLs? I don’t remember reading anywhere that you can do that, but maybe…,” and sure enough it works. Terrific!

Advertisements

One thought on “GitHub Commits in Patch Format

Add Your Thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s