I have a topic branch that I’ve been working on for quite some time and I would like to see just the changes made to this branch. For awhile I was being good and merging the master branch into my topic branch periodically, but eventually I forgot and now it’s diverged tremendously.
For example, let’s say I have a history like:
q---r---s---t---u---v---w---x---y---z---my_topic
/ / /
---a---b---c---d---e---f---g---h---i---j---k---l---m---HEAD
\ /
1---2---3 (another topic)
In this case, I would like to just see commits r, s, u, v, x, y, z for example. I don’t want to see any changes introduced by the merges. But since the branch diverged from HEAD, I can’t just look at the difference between HEAD and my branch. And they diverged to the point that merging them together is a heck of a lot of work just to see the differences.
So is there a way to see the commits made on a given branch that did not originate on another branch or as a result of a merge with another branch?
You can display the commits that are in
my_topicbut not inHEAD, excluding merge commits using:You could actually leave
HEADout and just use..my_topic, but the two commitish form is more general.