13

有没有一种方法可以使用标准的 git 命令来查找特定作者在 git 存储库中触及的所有文件,最好是在两个指定日期之间?我知道我可以使用git log --author="Name",但理想情况下我只想要一个文件名列表,而不是别的。

4

2 回答 2

18

看到这个答案我可以让 git 告诉我一个用户修改的所有文件吗?

git log --pretty="%H" --author="authorname" | while read commit_hash; do git show --oneline --name-only $commit_hash | tail -n+2; done | sort | uniq
于 2013-09-13T10:40:34.117 回答
5

除了 Manuel van Rijn 对仅在两个指定日期之间查找日志的回答

git log [<options>] [<since>..<until>] [[--] <path>…]

来源: https ://www.kernel.org/pub/software/scm/git/docs/git-log.html

于 2013-09-13T10:39:01.283 回答