git diff between cloned and original remote repository

前端 未结 3 1760

I have cloned a github repository and made no changes locally. Github repository moved forward with commits on the same branch.

  1. How do I find a diff between my
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 16:30

    1) Add any remote repositories you want to compare:

    git remote add foobar git://github.com/user/foobar.git
    

    2) Update your local copy of a remote:

    git fetch foobar
    

    Fetch won't change your working copy.

    3) Compare any branch from your local repository to any remote you've added:

    git diff master foobar/master
    

提交回复
热议问题