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

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

 git log
git log origin/master..master

我希望看到至少10个本地提交(只有本地)。

119952 次浏览

This will show you all not pushed commits from all branches

git log --branches --not --remotes

and this will show you all your local commits of branch main

git log origin/main..main