Git: How to list commits on a merged branch?
问题 This is the inverse of how to list commits on a branch but not merged branches, so I'll ask it in the same format. Let's say my git commit history looks like this: A---B---C---D---E---F master \ / X---Y---Z topic How do I list the commits on the topic branch -- that is, X , Y , and Z ? Note that simply doing git log topic won't work -- that will return commits A and B as well. I had thought I could run git merge-base topic master to find B , and then do git log B..Z to get these commits.