代码之家  ›  专栏  ›  技术社区  ›  Totor

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

  •  3
  • Totor  · 技术社区  · 11 年前

    如果我这样做:

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

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

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

    1 回复  |  直到 11 年前
        1
  •  4
  •   ForgetfulFellow    11 年前

    您正在寻找:

    --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.
    

    ?