如何获得结合每次提交差异的日志列表
即:
commit1
Author
Date
Commit message
changes between commit1 and commit2
commit2
Author
Date
Commit message
changes between commit2 and commit3
...
使用
git log/some/file
列出更改了 some/file 的提交
即:
commit1
Author
Date
Commit message
commit2
Author
Date
Commit message
...
但是,每次提交中的更改不会显示
使用
git diff hash1..hash2/some/file
给出这两次提交之间/some/file 中的更改。
但仅在这 2 次提交之间,而不是通过所有更改/some/file 的提交
最佳答案
根据 https://git-scm.com/docs/git-log你可以使用
git log -p path显示涉及指定路径的提交,以及关于相同指定路径的差异。
关于带有差异的 Git 日志用于某个文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38636105/