Skip to content

Instantly share code, notes, and snippets.

View ilmari's full-sized avatar

Dagfinn Ilmari Mannsåker ilmari

View GitHub Profile
@pjf
pjf / gist:8231962
Last active January 2, 2016 01:39
The curious matter of finding a given merge

My problem:

I'm working on a project where upstream doesn't use source control of any sort. Yes, that's exactly the same reaction I had as well.

I keep track of their releases on a branch named upstream. When new releases are made, I add them to this branch as a single commit, so at least I know what changed (in bulk) from the last release.

My changes (usually!) end up in the official releases, but because they don't use source control, my commits never do. Hence I want to find all the commits I've made since the last merge, as an "approximation" of what's changed between my release and theirs. Simple git log A..B isn't what I want here.

So, here's the network graph. I want to find the last point on master where upstream was merged in. In this case, that's 9039b22b .