查看未压入的Git提交 [英] Viewing Unpushed Git Commits

查看:118
本文介绍了查看未压入的Git提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何查看我所做的任何尚未推送到远程存储库的本地提交?有时候, git status 会打印出来,我的分支是X在 origin / master 之前提交,但并非总是如此。 / p>

这是我安装Git的错误,还是我错过了什么? 解决方案

>您也可以使用相同的语法查看diff

  git diff origin / master..HEAD 


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.

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屋!

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