Last active
August 1, 2018 11:49
-
-
Save Vladnev/a47da8f350b3b48f2f40983dfe45d83b to your computer and use it in GitHub Desktop.
Count code rows by author
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Count commits by author: | |
git log --pretty=format:==%an --numstat | \ | |
sed -r '/==.*/{s/^==//;h;D};/^$/D;s/-/0/g;s/\t[^\t]+$//;G;s/(.*)\n(.*)/\2\t\1/' \ | |
| awk -F '\t' '{add[$1]+=$2;del[$1]+=$3} END {for (i in add) {print i,add[i],del[i]}}' | |
Delete branches(not current && not master): | |
alias clear-merged-branches='git branch --merged | grep -v -E "(^\*|\bmaster\b)" | xargs git branch -d' | |
alias clear-branches='git branch | grep -v -E "(^\*|\bmaster\b)" |xargs git branch -D' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment