Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
1  
Would stackoverflow.com/questions/61002/… help? –  VonC Jul 12 '11 at 17:51

2 Answers 2

up vote 2 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
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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