zoukankan      html  css  js  c++  java
  • Git代码行数统计命令

    进入项目目录下(包含.git的目录)
    1.统计sujing在某个时间段内的git新增/删除代码行数
    git log --author=sujing --since=2019-01-01 --until=2020-02-01 --format='%aN' | sort -u | while read name; do echo -en "$name	"; git log --author="$name" --pretty=tformat: --numstat | grep "(.html|.java|.xml|.properties)$" | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s
    ", add, subs, loc }' -; done
     2.统计该项目所有的代码数
    git log  --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 }'
     
  • 相关阅读:
    使用VS2015将解决方案同步更新到Github上
    SQL Server循环
    OSPF
    OPSF
    OSPF
    pandas更换index,column名称
    pandas的时间戳
    pandas选择单元格,选择行列
    BGP
    BGP
  • 原文地址:https://www.cnblogs.com/supiaopiao/p/10943882.html
Copyright © 2011-2022 走看看