列表Git提交尚未推送到原始位置[重复]

本文翻译自:List Git commits not pushed to the origin yet [duplicate]

Possible Duplicate: 可能重复:
Viewing Unpushed Git Commits 查看未推动的Git提交

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? 或者,如何确定具有特定哈希值的提交是否已被推送到原点?


#1楼

参考:https://stackoom.com/question/cVnD/列表Git提交尚未推送到原始位置-重复


#2楼

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: 您可以将其与grep一起使用以检查特定的已知提交:

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

Or you can also use git-rev-list to search for a specific commit: 或者,您也可以使用git-rev-list搜索特定的提交:

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


#3楼

how to determine if a commit with particular hash have been pushed to the origin already? 如何确定具有特定哈希值的提交是否已被推送到原点?

# list remote branches that contain $commit
git branch -r --contains $commit
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值