可能的重复: 查看未推送的Git提交

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

或者,如何确定具有特定哈希的提交是否已经被推到原点?


Git日志来源/master.

或者,更一般地说:

Git日志<since>..<直到>.

你可以使用grep检查特定的已知提交:

Git日志<since>..grep <commit-hash> .直到> |

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

grep <commit-hash>


如何确定具有特定哈希的提交是否已经被推到原点?

# list remote branches that contain $commit
git branch -r --contains $commit