Say, I've been presented with a merge conflict, and I managed to fix it, but haven't marked as resolved (i.e. I haven't done git add
conflicted files yet). At this point, I can do git diff
and I'll be shown how the resultant file differs from each parent, in a combined diff format.
All good so far. Now I wanted to separately inspect how resultant file differs from individual parent. Sure, for a merge conflict involving 2 parents (cherry-pick, rebase etc.), I can use git diff --ours
or git diff --theirs
, but how do I extend this to more parents?
In other words, if I get conflict from 3 parents, is it possible to view individual diffs w.r.t each parent?
Also, my discovery of --ours
and --theirs
was rather serendipitous; I couldn't find their usage documented in a diff context.