I have forked a project on github and need to have a set of changes I made since I forked, in diff format.
If you wonder – I’ve forked Apache httpd and I’m changing some code in core. Currently I’m not commiting any changes, running git diff, and use its output as a patch against vanilla httpd sources in an RPM building process. It is, of course, wrong, but I don’t know how to do it properly. All I know is I need a diff in the end.
Online solution:
The "compare two commits" API does support multiple repositories:
Example:
https://api.github.com/repos/octocat/hello-world/compare/master…abejpn:master
Or with a GitHub URL:
https://github.com/octocat/Hello-World/compare/master…abejpn:master
Original answer 2010:
(
git remote add mainRepo github_url)git fetch mainRepoto get the latest changes from that original "mainRepo".git log HEAD..mainRepo/masterwill show you all your changes between the latest on mainRepo master branch and your current branch.git diff HEAD..mainRepo/masterwould display it in diff format.In learn.GitHub:
would list all your changes since you have forked from
mainRepo: