How to Diff between local uncommitted changes and origin

后端 未结 4 1381
我在风中等你
我在风中等你 2021-01-29 20:49

Let\'s say I cloned a repository and started modifying files. I know that if I have local uncommitted changes, I can do a diff as follows git diff test.txt and it w

4条回答
  •  日久生厌
    2021-01-29 20:55

    Given that the remote repository has been cached via git fetch it should be possible to compare against these commits. Try the following:

    $ git fetch origin
    $ git diff origin/master
    

提交回复
热议问题