git diff <commit> <commit>
java
git diff <commit^>
或 git diff-tree -p <commit>
git
git diff-tree --no-commit-id --name-only -r <commit>
bash
示例:code
$ git diff-tree --no-commit-id --name-only -r HEAD src/packer/GitMessenger.java src/packer/PackerModule.java
git checkout <branch> path/to/the/file git checkout <commit> path/to/the/file