What git command gets the list of all committers to files containing specific text. This can optionally include a before/after parameter. The problem I am facing is, is there any specific command for this, or can I get the list of files and pipe it to some command?
Let do that in two stages. 1st let's get the list of files:
files=`git grep -l "searh string"`
Having the list let's list all commits that touch the files, get the author's name/email for every commit, sort the list of authors printing only unique name/email.
git log --format='%an <%ae>' -- $files | sort -u
Combine two commands into one:
git log --all --format='%an <%ae>' -- `git grep -l "search string"` | sort -u
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