Git 統計腳本

統計行數:

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=201605-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表示結束時間。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章