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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30601511/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:16:01  来源:igfitidea点击:

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

gitbitbucket

提问by tom

I am using the following commands to see all the local commits which are not pushed to remote branch but I am not getting all those local commits.

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

 git log  
 git log origin/master..master  

I want to see at-least 10 local commits(only local).

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

回答by Aleksander Monk

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

这将显示您所有的本地提交

git log origin/master..HEAD