views:

133

answers:

3

i would like to know which files would be updated (and hopefully the changes that would occur) if i'd do a 'git pull'...

is

git stash 
git fetch
git diff origin/master
git stash apply 

the answer ?

+6  A: 

See here. To quote:

you can do a 'git fetch origin', then a 'git log master..origin/master', and it'll tell you what changes will be merged if you do a 'git merge origin/master'.

Brian Agnew
i guess also 'git log master...origin/master'
arod
+2  A: 

Since git pull is git fetch plus git merge, do the fetch first, and then diff the remote branch against your current branch (git diff origin/whatever..).

Peter Eisentraut
Isn't that what he just said?
ZeissS
+2  A: 

is

git stash 
git fetch
git diff origin/master
git stash apply 

the answer ?

Yes.

Dan Moulding