git diff between cloned and original remote repository

前端 未结 3 1771

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:15

    Another reply to your questions (assuming you are on master and already did "git fetch origin" to make you repo aware about remote changes):

    1) Commits on remote branch since when local branch was created:

    git diff HEAD...origin/master
    

    2) I assume by "working copy" you mean your local branch with some local commits that are not yet on remote. To see the differences of what you have on your local branch but that does not exist on remote branch run:

    git diff origin/master...HEAD
    

    3) See the answer by dbyrne.

提交回复
热议问题