How do I get commit messages between two branches?


I’m looking for an api command on how to find commit message between two branches.

There is a similar question in

but the response is not what I am looking for.

I am really looking for the commit message when I compare branches (and not from master default branch)

it’s like doing: branch-2222

and just get the oneline commit message