I think the command you are looking for is:
git rev-list HEAD..HEAD@{u}
This will list all commit SHAs that are on the tracking branch but not your local branch. rev-list
is simply command for listing revisions and the @{u}
on a branch name means “the remote tracking-branch of this branch”.