zoukankan      html  css  js  c++  java
  • git 代码统计

    查看git上的个人代码提交量:

    git log --author="Marek Romanowski" --since="2019-01-01" --no-merges | grep -e 'commit [a-zA-Z0-9]*' | wc -l

    查看git上的个人代码量:

    git log --since="2019-01-01" --until='2019-02-01' --author="Marek Romanowski" --pretty=tformat: --numstat --no-merges | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s ", add, subs, loc }' -

    统计每个人增删行数

    git log --format='%aN' | sort -u | while read name; do echo -en "$name "; git log --since ==2019-01-01 --until==2019-02-01 --author="$name" --no-merges --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s ", add, subs, loc }' -; done > a.cvs

    代码提交量排行

    git log --since=30.day.ago --no-merges --pretty='%aN' | sort | uniq -c | sort -k1 -n -r

    https://segmentfault.com/a/1190000008542123

  • 相关阅读:
    P2622 关灯问题II(关灯问题)
    P1140 相似基因
    Choose and Divide UVa 10375
    Disgruntled Judge UVA
    Color Length UVA
    P1052 过河
    P1026 统计单词个数
    Balanced Number HDU
    The SetStack Computer UVA
    Urban Elevations UVA
  • 原文地址:https://www.cnblogs.com/tonggc1668/p/10395972.html
Copyright © 2011-2022 走看看