Git:显示修改给定文件的提交的完整日志(或差异)

时间:2014-02-19 23:49:29

标签: git filter git-diff git-log

如果我这样做:

git log --stat -p -- my/file

我得到修改my/file的每个提交的列表,但它只显示关于--stat的文件列表和差异(分别为-pmy/file),从而隐藏完整的提交更改日志。

如何显示此提交列表的完整日志(已修改文件和完整差异)?

1 个答案:

答案 0 :(得分:3)

您在寻找:

--full-diff
           Without this flag, "git log -p <path>..." shows commits that touch
           the specified paths, and diffs about the same specified paths. With
           this, the full diff is shown for commits that touch the specified
           paths; this means that "<path>..." limits only commits, and doesn't
           limit diff for those commits.