After (or before) doing a git pull, is there an easy way to see what the updates are that have been pushed by others to the branch I am working on?

link|improve this question

1  
Would stackoverflow.com/questions/61002/… help? – VonC Jul 12 '11 at 17:51
feedback

2 Answers

up vote 1 down vote accepted

I think you'd first do a

git fetch

to pull the new commits, but not merge them yet. Then you could log the changes between your current repository and the remote origin:

git log HEAD..origin

Finally, merge the changes:

git merge origin

For example:

$ git fetch

[...]
From github.com:blah
   00f82fa..38e4017  master     -> origin/master

and:

$ git log HEAD..origin
commit 38e4017bc89a6eb41252465cbde68f7d897377cb
Author: Werner Robitza
Date:   Tue Jul 12 10:56:49 2011 -0700

    Edited Gemfile via GitHub
link|improve this answer
feedback

Rather than pulling the other branch into yours, you can first inspect the commits that will be pulled in with git log MINE..THEIRS. If it is a remote branch, you can fetch their latest changes for the comparison with git remote update.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.