git log 查找出修改过指定文件的 commit

103 阅读1分钟
git log --stat --full-history --simplify-merges -- /test.java

--stat  生成差异统计

--full-history  所有的commit记录

--simplify-merges 可以增强 --full-history 的能力,因为 --full-history 会把一些无用的合并
 commit 也输出出来(有一些是 Merge branch xxx),增加 --simplify-merges 参数可以去除
这些无用的 commit 信息。