git diff - show only what's new on the remote

前端 未结 3 1570
自闭症患者
自闭症患者 2021-02-20 13:24

I have a local repo and a remote repo on github. For business reasons, they aren\'t in sync. I\'ve done a lot of work on the local that I\'m keeping, and now I\'m manually add

3条回答
  •  醉话见心
    2021-02-20 14:03

    You can diff with the common ancestor:

    git diff `git merge-base master origin/master` origin/master
    

    Or with your previous fetch:

    git diff origin/master@{1} origin/master
    

提交回复
热议问题