如何查看源/主在主机之前的提交消息? [英] How to see the commit messages that origin/master is ahead of master?

查看:159
本文介绍了如何查看源/主在主机之前的提交消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当git告诉我我的本地分支在master后面时,我如何告诉git打印出我在后面的日志消息。例如,在下面的情况中,我如何查看在master / master上的2个提交的日志消息,我没有掌握这些消息?

  git status 
#在分支master上
#你的分支在2次提交后落后于'origin / master',并且可以被快速转发。

没有提交,工作目录干净


解决方案您可以尝试(以下为 Git比较 .. .. 和没有点之间的区别是什么):

  git log master..origin / master 

这与以下内容相同:

  git log origin / master ^ master 

(让我看看 origin / master 是否是 - ^ ' - on master




When git informs me that my local branch is behind master, how do I tell git to print out the log messages that I am behind on. For example, in the situation below how do I view the log messages of the 2 commits on origin/master that I don't have on master?

git status
# On branch master
# Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
#
nothing to commit, working directory clean

解决方案

You can try (following "Git diff .. ? What's the difference between having .. and no dots"):

 git log master..origin/master

Which is the same as:

git log origin/master ^master

(show me the commits on origin/master which are not -- '^' -- on master)

这篇关于如何查看源/主在主机之前的提交消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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