当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
答案 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
上的}