is there a tool that lets you view the difference between 2 git branches side by side on the command line? kind of like this. I know there's `git log --graph` but I always find it hard to read.

(here it shows the commits that are only on each branch on the left/right, and then the shared commits are in the middle)

@b0rk Do you want to see plain lists of commits, or some hints to their relationships too? (This seems to matter most for the bottom box, which might not be "single headed" if there are commits that were merged into both branches at different points in their histories.)

@robryk happy to hear about any existing tools! the only thing i've heard of so far is git-vee plover.com/misc/stop-merging/s

Follow

@b0rk For the case with merges I don't know of anything that's better than `log --graph` and I also don't really know how I'd want to see the cases with weird merges printed.

For the case with no merges, have you looked at `git log --topo-order --graph`? If there are no merges _at all_, the graph will be a Y-shaped tree with the contents of each of the left and right box grouped together. I've found the Mercurial equivalent (I don't remember the exact incantation for it, I have an alias for it at work) pretty readable. Sadly, I don't know how to get git to (a) make it obvious what goes in left and right box and (b) not make a huge mess if there are any merges whatsoever.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.