Can I get git to tell me all the files one user has modified?
Try git log --stat --committer=<user>
. Just put the user's name on the --committer=
option (or use --author=
as appropriate).
This will spit out all the files per commit, so there will likely be some duplication.
This will give you a simple list of files, nothing else:
git log --no-merges --author="Pattern" --name-only --pretty=format:"" | sort -u
Switch --author for --committer as necessary.
This isn't the only way, but it works:
git log --pretty="%H" --author="authorname" |
while read commit_hash
do
git show --oneline --name-only $commit_hash | tail -n+2
done | sort | uniq
Or, as one line:
git log --pretty="%H" --author="authorname" | while read commit_hash; do git show --oneline --name-only $commit_hash | tail -n+2; done | sort | uniq