如何查看origin / master超前的提交消息?

时间:2013-01-20 16:54:38

标签: git

当git告诉我我的本地分支落后于master时,如何告诉git打印出我背后的日志消息。例如,在下面的情况下,如何查看我在master上没有的2个提交的原始消息的日志消息?

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

1 个答案:

答案 0 :(得分:8)

您可以尝试(关注" Git diff .. ? What's the difference between having .. and no dots"):

 git log master..origin/master

与以下内容相同:

git log origin/master ^master

(显示origin/master的提交 - ' ^' - master上的

git log dots