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

     

  • 相关阅读:
    nginx学习编译安装(1)
    媒体查询
    web前端开发--超链接
    web前端开发--列表
    web前端开发--格式化文本与段落
    DIV与SPAN
    CSS基础
    表的创建
    数据库存储结构
    关系完整性约束
  • 原文地址:https://www.cnblogs.com/qiyer/p/10233545.html
Copyright © 2011-2022 走看看