From 03fa491e012387e255bbc926922b95ca911e3bd3 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Fri, 10 Mar 2017 11:42:23 +0100 Subject: [PATCH] Add git authors command --- bin/git-authors | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/git-authors diff --git a/bin/git-authors b/bin/git-authors new file mode 100755 index 0000000..09ca4ab --- /dev/null +++ b/bin/git-authors @@ -0,0 +1,10 @@ +#!/bin/bash +# Git authors statistics +# http://stackoverflow.com/a/13687302 + +git ls-tree -r -z --name-only HEAD -- $1 \ + | xargs -0 -n1 git blame --line-porcelain HEAD \ + | grep "^author " \ + | sort \ + | uniq -c \ + | sort -nr