diff current working copy of a file with another branch's committed copy

后端 未结 6 2100
醉话见心
醉话见心 2020-12-12 13:27

I have a repo with file foo in the master branch. I switched to bar branch and made some changes to foo. How can I now run a git diff

6条回答
  •  伪装坚强ぢ
    2020-12-12 13:38

    The following works for me:

    git diff master:foo foo

    In the past, it may have been:

    git diff foo master:foo

提交回复
热议问题