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 ?

arod
  • 13,481
  • 6
  • 31
  • 39

3 Answers3

5

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
  • 268,207
  • 37
  • 334
  • 440
2

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
  • 35,221
  • 12
  • 85
  • 90
2

is

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

the answer ?

Yes.

Dan Moulding
  • 211,373
  • 23
  • 97
  • 98