احصائيات git

git log --author="Fahad AlHantushi" --oneline --shortstat

git log --author="Fahad AlHantushi" --pretty=tformat: --numstat

git log --author="Fahad AlHantushi" --oneline --numstat

git shortlog -sne

git shortlog -sne --no-merges

git log --pretty=format:%ae \ | gawk -- '{ ++c[$0]; } END { for(cc in c) printf "%5d %s\n",c[cc],cc; }'

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

git log --pretty=format:%ae \ | gawk -- '{ ++c[$0]; } END { for(cc in c) printf "%5d %s\n",c[cc],cc; }' |grep sort -r

total:
git log --author="Fahad AlHantushi" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -

git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done

###### by lines each user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*?\((.*?)\s+[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n

show minimum graph log

git log --graph --decorate --oneline

same as above but more clear git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"

show log lines

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative

Alias

[alias]
  lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
  lol = log --graph --decorate --pretty=oneline --abbrev-commit
git shortlog -s -n 

GUI

https://github.com/ejwa/gitinspector

Resources:

https://about.gitlab.com/2016/12/08/git-tips-and-tricks/#the-most-common-commands