Is there a “git pull --dry-run” option in Git?

后端 未结 7 1343
星月不相逢
星月不相逢 2021-01-29 22:43

Is there such a thing as git pull --dry-run to see how stuff will be merged before it messes up my working tree?

Right now I am doing:

git f         


        
7条回答
  •  一生所求
    2021-01-29 23:36

    # fetch new commits from origin
    $ git fetch
    
    # check what are the differences and judge if safe to apply
    $ git diff origin/master
    
    # actually merge the fetched commits 
    $ git pull
    

提交回复
热议问题