We list all the files contributed by certain developer as follows:
git log --no-merges --author="SomeDev" --name-only --pretty=format:"" | sort -u
The problem with this approach that it lists also files that were created by SomeDev at some point but later removed. How can I limit the above only to those files currently present in HEAD? (Maybe that output can be piped together with git ls-files somehow).
Preferably
- it should track renames also, i.e.: if SomeDev has authored
file_old.txtand it was later renamed (by him or anybody else) tofile_new.txt- it should be listed as well. - it should list the first(/original) author if a file has several authors (e.g. when it was removed and then readded).