如何查看所有未推送到远程分支的本地提交?

How to see all local commits which are not pushed to the remote branch?

我正在使用以下命令查看所有未推送到远程分支的本地提交,但我没有获得所有这些本地提交。

 git log  
 git log origin/master..master  

我想看到至少 10 个本地提交(仅限本地)。

这将显示所有分支中所有未推送的提交

git log --branches --not --remotes

这将向您显示分支 main

的所有本地提交
git log origin/main..main