zoukankan      html  css  js  c++  java
  • git仓库按时间、成员等维度分析统计

    git 按时间打印所有成员代码提交:

    git log --since ==2018-01-01 --until=2018-12-31 --format='%aN' | sort -u | while read name; do echo -en "$name	"; 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
    ", add, subs, loc }' -; done
    

      

    单个成员查询:

    git log --since=2018-01-01 --until=2018-12-31 --author="DENAchuanyong.zhu" --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 }' -
    

      

    以上是git命令,以下介绍一下gitstats

    1.example

    2.安装

    a.安装gitstats
    git clone git://github.com/hoxu/gitstats.git
    
    b.安装brew
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
    c.安装gnuplot画图程序
    brew install gnuplot
    
    d.运行命令
    cd xxx/gitstats
    python gitstats Documents/gitxxx Documents/gitoutput
    
    xxx/gitstats         为gitstats的本地clone地址
    Documents/gitxxx     为本地代码仓库路径
    Documents/gitoutput  为生成报表位置
    

      

     更多:

     https://segmentfault.com/a/1190000008542123

     

  • 相关阅读:
    HttpWatch 有火狐版本?
    JQgrid的最新API
    jqgrid
    JSON的学习网站
    array创建数组
    Numpy安装及测试
    SQLite3删除数据_7
    SQLite3修改数据_6
    SQLite3查询一条数据_5
    SQLite3查询所有数据_4
  • 原文地址:https://www.cnblogs.com/qiyer/p/10233545.html
Copyright © 2011-2022 走看看