Contents

Output GitHub commits as unified diffs

Contents

I use a lot of GitHub - in my view it’s the premier Git hosting solution out there and keeps getting better and better. Every now and again I stumble across a useful little trick or technique that I don’t know about. This one is a means to output commits on GitHub as unified diff files. I’ve blogged it because I can’t find it anywhere in the GitHub documentation. The trick is very easy - simply add .patch to the end of any commit URL to output the commit as a unified diff patch file. For example, this commit becomes a diff. Simple. Enjoy.