统计行数:
git log --author="$(git config --get user.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 }' -
统计提交(前10个):
git log --since=2016–05-20 --until=2017-05-20 --pretty='%aN' | sort | uniq -c | sort -k1 -n -r | head -n 10
git log --since=2015–10-10 --until=2017-05-20 --oneline | wc -l
--since
表示起始时间, --until
表示结束时间。