Skip to content

Instantly share code, notes, and snippets.

@bananita
Created October 12, 2015 14:05
Show Gist options
  • Save bananita/0b5c79f8de16219da000 to your computer and use it in GitHub Desktop.
Save bananita/0b5c79f8de16219da000 to your computer and use it in GitHub Desktop.
Check number of lines in git
#!/bin/bash
IFS=$'\n'
git log --format='%aN' | sort -u | while read -r user ; do
echo $user
git log --author=$user --pretty=tformat: --numstat -- . ":(exclude)*.pbxproj" ":(exclude)*.xcworkspace" ":(exclude)*.storyboard" ":(exclude)*.xib" ":(exclude)*Pods" ":(exclude)*Podfile.lock"| awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment