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
  • 15,175
  • 11
  • 42
  • 73

2 Answers2

18

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
  • 9,957
  • 1
  • 26
  • 50
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
  • 11,576
  • 8
  • 70
  • 94