13

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.

Andrew Ferrier
  • 16,664
  • 13
  • 47
  • 76

2 Answers2

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