How to do a git diff on moved/renamed file?

后端 未结 6 1491
温柔的废话
温柔的废话 2020-12-07 15:57

I moved a file using git mv. Now I would like to do a diff on the new file to compare it with the old file (with the old, now non-existent name).

How d

6条回答
  •  广开言路
    2020-12-07 16:44

    simply run git diff without any arguments, or git diff -- newfilename. git is smart enough to compare the right files/contents (i.e. original content before rename with altered content after rename)

提交回复
热议问题