is there a simple way to know which files will be updated in the next 'git pull'?

杀马特。学长 韩版系。学妹 提交于 2019-12-07 15:18:37

问题


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 ?


回答1:


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'.




回答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..).




回答3:


is

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

the answer ?

Yes.



来源:https://stackoverflow.com/questions/2284931/is-there-a-simple-way-to-know-which-files-will-be-updated-in-the-next-git-pull

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!