Skip to content

Instantly share code, notes, and snippets.

View DrLeh's full-sized avatar
😡
incredibly frustrated with git credential manager.

Devon Lehman DrLeh

😡
incredibly frustrated with git credential manager.
View GitHub Profile
@ezamelczyk
ezamelczyk / gitcount.sh
Created June 14, 2019 09:45
Git count lines by author
#!/bin/sh
git log --shortstat | grep -E "(Author: )(\b\s*([A-Z]\w+)){2}|fil(e|es) changed" | awk '
{
if($1 ~ /Author/) {
author = $2" "$3
} else {
files[author]+=$1
inserted[author]+=$4
deleted[author]+=$6
}