Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see the commit messages that origin/master is ahead of master?

Tags:

git

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
like image 781
ams Avatar asked Jan 20 '13 16:01

ams


1 Answers

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)

git log dots

like image 127
VonC Avatar answered Sep 27 '22 21:09

VonC