git log ..<branchname>
Lists the commits that are available in <branchname> but not in the current branch
Variations include using different formatting options with --oneline, --graph, etc., or specifying a commit hash instead of a
git log <branchname>.. lists the commits available in <branchname> that are not part of the current branch.
Both of them are particular cases of git log <commitA>..<commitB> which lists the commits available in <commitB> that are not part of <commitA>'s history.
Examples:
git log ..main
Manual page
git logRelated commands