I want to list all commits that are only part of a specific branch.
With the following, it lists all the commits from the branch, but also from the parent (master)>
git rev-list --exclude=master --branches --no-walk
will list the tips of every branch that isn't master.
git rev-list master --not $(git rev-list --exclude=master --branches --no-walk)
will list every commit in master's history that's not in any other branch's history.
Sequencing is important for the options that set up the filter pipeline for commit selection, so --branches has to follow any exclusion patterns it's supposed to apply, and --no-walk has to follow the filters supplying commits rev-list isn't supposed to walk.