Git - a list of all authors of a file folder?

How can I list the names of the authors of a particular folder whose version is git?

I see that I can git blame file and list the author of each line, but I can not do this for the folder, and I will also like only a unique list (each author lists only once)

+6
source share
2 answers

Based on the shortest possible output from git log containing author and date

do it

 git log --pretty=format:"%an%x09" myfolder | sort | uniq 
+9
source

Actually, there is a built-in Git command for this, git shortlog :

 git shortlog -n -s -- myfolder 

will provide a list of committers who touched myfolder . By disabling the -s option, the summary even lists a summary of the commit message for the author. The -n option sorts authors by the number of commits (highest to lowest), rather than alphabetically.

0
source

Source: https://habr.com/ru/post/972396/


All Articles