列表Git提交没有推送到原点 [英] List Git commits not pushed to the origin yet

查看:96
本文介绍了列表Git提交没有推送到原点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:

查看未提交的Git提交


如何列出所有提交还没有推到原点?



另外,如何确定一个具有特定散列的提交是否已经被推送到原点?

解决方案

git log origin / master..master



或更一般地说:

git log<自> ..< until> p>

您可以在grep中使用它来检查特定的已知提交:

git日志<自> ..<直到> | grep< commit-hash>



或者你也可以使用git-rev-list来搜索特定的提交:



git rev-list origin / master | grep< commit-hash>


Possible Duplicate:
Viewing Unpushed Git Commits

How do I list all commits which have not been pushed to the origin yet?

Alternatively, how to determine if a commit with particular hash have been pushed to the origin already?

解决方案

git log origin/master..master

or, more generally:

git log <since>..<until>

You can use this with grep to check for a specific, known commit:

git log <since>..<until> | grep <commit-hash>

Or you can also use git-rev-list to search for a specific commit:

git rev-list origin/master | grep <commit-hash>

这篇关于列表Git提交没有推送到原点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆