git (1) compare two different versions of a file

git diff commit_id1:file_name  commit_id2:file_name
或者
git diff commit_id1 commit_id2 -- file_name

It can also be used instead of the HEAD commit_id

Guess you like

Origin www.cnblogs.com/ishen/p/11971782.html