查看未推送的 Git 提交 [英] Viewing unpushed Git commits
本文介绍了查看未推送的 Git 提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何查看我所做的尚未推送到远程存储库的任何本地提交?偶尔,git status
会打印出我的分支是 origin/master
之前的 X 次提交,但并非总是如此.
How can I view any local commits I've made, that haven't yet been pushed to the remote repository? Occasionally, git status
will print out that my branch is X commits ahead of origin/master
, but not always.
这是我安装 Git 的错误,还是我遗漏了什么?
Is this a bug with my install of Git, or am I missing something?
推荐答案
git log origin/master..HEAD
您也可以使用相同的语法查看差异
You can also view the diff using the same syntax
git diff origin/master..HEAD
这篇关于查看未推送的 Git 提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文