How to preview git-pull without doing fetch?

前端 未结 8 2027
天涯浪人
天涯浪人 2020-11-29 14:41

Is it even possible?

Basically, there\'s a remote repository from which I pull using just:

git pull

Now, I\'d like to preview what

8条回答
  •  时光说笑
    2020-11-29 15:26

    You can fetch from a remote repo, see the differences and then pull or merge.

    This is an example for a remote repo called origin and a branch called master tracking the remote branch origin/master:

    git checkout master                                                  
    git fetch                                        
    git diff origin/master
    git pull --rebase origin master
    

提交回复
热议问题