Is there a way I can use standard git commands to find all the files that were touched by a particular author in a git repository, ideally between two specified dates? I know I can use git log --author="Name"
, but ideally I'd just like a list of filenames, and nothing else.
Asked
Active
Viewed 3,833 times
13

Andrew Ferrier
- 16,664
- 13
- 47
- 76
-
This may help you https://www.kernel.org/pub/software/scm/git/docs/git-log.html – Farid Movsumov Sep 13 '13 at 10:40
-
If git had `git blame
`, it would be as simple as grepping output, but it doesn't... – Jakub Narębski Sep 13 '13 at 12:51
2 Answers
20
See this answer Can I get git to tell me all the files one user has modified?
git log --pretty="%H" --author="authorname" | while read commit_hash; do git show --oneline --name-only $commit_hash | tail -n+2; done | sort | uniq

Community
- 1
- 1

Manuel van Rijn
- 10,170
- 1
- 29
- 52
5
Additionally to Manuel van Rijn's answer for find logs only between two specified dates
git log [<options>] [<since>..<until>] [[--] <path>…]
SOURCE: https://www.kernel.org/pub/software/scm/git/docs/git-log.html

Farid Movsumov
- 12,350
- 8
- 71
- 97