tags:

views:

31

answers:

1

I have a git-repo and need only the authors of a specific file. I can extract the authors from the git-blame command, but is there an easier way to get only the author names of a file?

+6  A: 
git log --format=%an -- $file

will show you all commits for that file and only the authors for that commit. so you have one author per line

another easy solution would be to use git shortlog

git shortlog -s -- $file # add -n to sort by number of commits
knittl