Home > Mobile >  Git how to sort files based on number of authors
Git how to sort files based on number of authors

Time:10-08

In the Git history, how to sort the files which have more number of authors in the last 1 year.

I have used the below command to list all the authors and their commit count for the file.

git blame --line-porcelain $i | sed -n 's/author //p' | sort | uniq -c | sort -rn

But I need to list files which has more number of author and not more number of commit by the same person.

CodePudding user response:

To list all commits in your repo since one year, you can use git log :

git log --all --since "1 year"

You can use the --format option to customize the message printed for each commit :

  •  Tags:  
  • git
  • Related