Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding all files touched by a particular author in git history? [duplicate]

Tags:

git

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.

like image 311
Andrew Ferrier Avatar asked Sep 13 '13 10:09

Andrew Ferrier


People also ask

How do I find in git which file has the most activity?

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).

What is grep in git?

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.

How do I see revision history in git?

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.


1 Answers

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
like image 166
Manuel van Rijn Avatar answered Sep 19 '22 06:09

Manuel van Rijn