git diff between two different files

前端 未结 3 1902
悲哀的现实
悲哀的现实 2021-01-29 19:11

In HEAD (the latest commit), I have a file named foo. In my current working tree, I renamed it to bar, and also edited it.

I want

3条回答
  •  一向
    一向 (楼主)
    2021-01-29 19:51

    Specify the paths explicitly:

    git diff HEAD:full/path/to/foo full/path/to/bar

    Check out the --find-renames option in the git-diff docs.

    Credit: twaggs.

提交回复
热议问题