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.
How can I search my git logs to see which files have had the most activity? You can use git diff --stat revA revB to get the sum of all additions removals (but it won't tell you the absolute number of commits that actually touched the file).
Git Grep. Git ships with a command called grep that allows you to easily search through any committed tree, the working directory, or even the index for a string or regular expression. For the examples that follow, we'll search through the source code for Git itself.
Git file History provides information about the commit history associated with a file. To use it: Go to your project's Repository > Files. In the upper right corner, select History.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With