1.用git rev-list HEAD取得版本号列表:
在SmartGit中看到的也是这样,验证了我们的猜想:
取到两个版本号之后,用git diff命令:git diff [--options] ... [--] […]
这里的[-options]我们填的是--name-status,指的是版本号,也就是每次版本的散列值,可以填前几位就可以了,git会自动识别。
--name-status选项,可以输出每个修改的文件的状态,添加,修改,删除还是重命名等。
输入命令git diff --help可以查看帮助文档:
--name-status
Show only names and status of changed files. See the description of the--diff-filter option on what the status letters mean.
--diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]]
Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (i.e. regular file, symlink, submodule, …) changed (T), are Unmerged (U), are Unknown (X), or h