简体   繁体   English

如何检查哪些提交未被推送到原点?

[英]How can I check which commits have not been pushed to origin?

I have made commits to my local branch (let's just say master) and have 'git pull'd down changes that others have made. 我已经提交到我当地的分支机构(让我们只是说主人),并且'git pull down了其他人所做的改变。 When I run a 'git status', I see something like: 当我运行'git status'时,我看到类似的东西:

# Your branch is ahead of 'origin/master' by 4 commits.

How can I see a list of the four commits that I have made that have yet to be pushed to origin? 我怎样才能看到我所做的四个提交的列表尚未被推送到原点?

git diff --stat origin/master

will show the changed files. 将显示已更改的文件。

git log origin/master..master

will show the commits. 将显示提交。

I tend to use gitk (or gitk --all) which will show this history of the branch. 我倾向于使用gitk(或gitk --all)来显示分支的历史。 It also displays large friendly labels on origin/master and master (and any other tags that you have). 它还会在origin / master和master(以及您拥有的任何其他标记)上显示大型友好标签。

A more lo tech version is git log --graph 更低技术的版本是git log --graph

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM