查看个人指定时期内代码行数,注意将 --author="user.name" 替换成自己的用户名

git log --since="2018-07-16" --before="2019-02-14" --author="user.name" --pretty=tformat: --numstat | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }'

查看所有人代码行数

git log --pretty='%aN' | sort -u | while read name; do echo -en "$name\t"; 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 \n", add, subs, loc }' -; done

查看提交排名前5

git log --pretty='%aN' | sort | uniq -c | sort -k1 -n -r | head -n 5

查看开发者人数

git log --pretty='%aN' | sort -u | wc -l

查看总提交次数

git log --oneline | wc -l

git统计代码行数的更多相关文章

  1. Eclipse统计代码行数

    开发过程中,经常需要统计代码行数,这时可以通过Eclipse的Search功能来实现. 步骤: 1.在Package Explorer中选中需要统计的包: 2.单击菜单Search-->File ...

  2. 在Flash Builder或者Eclipse统计代码行数的方法

    在Flash  Builder或者Eclipse统计代码行数的方法如下图菜单栏--搜索--搜索文件

  3. 【Linux】常用命令-统计代码行数

    公司人员流动大,经常有新的维护任务,交接时喜欢看看新来的模块的代码量,那么问题来了, 如何统计代码行数? 1,最先想到的肯定是 wc. wc -l *.h 将查看[当前目录]下头文件的代码行数,输出结 ...

  4. c#统计代码行数

    小编,已经快学了两年编程了.昨天突发奇想,想统计下这些年到底写过多少行代码,于是做了一个这个小程序来统计代码行数.老规矩,先上图. 比较惭愧,写了两年只有2万多行.那我们还是进入下一项吧. 界面搭建我 ...

  5. 【未解决】对于使用Windows的IDEA进行编译的文件,但无法在Linux系统中统计代码行数的疑问

    在我学习使用Windows的IDEA的过程中,将代码文件转移到Linux虚拟机当中,但无法在Linux系统中统计代码行数. 注意:拷贝进虚拟机的文件均能编译运行. 具体过程如下: root@yogil ...

  6. Visual Studio 统计代码行数

    介绍一种简单的统计代码行数的小技巧, 使用正则表达式,用VS强大的查找功能 b[^:b#/]+.$ 最后结果:

  7. 用django统计代码行数+注释行数

    实现统计代码行数: 1.首先在url.py中配置 from django.conf.urls import url from django.contrib import admin from app0 ...

  8. cloc 统计代码行数工具

    cloc 统计代码行数工具 官网地址:http://cloc.sourceforge.net/ 下载完成后 会生成一个.exe文件 需要修改文件名为 cloc.exe 然后把这个文件拷贝到需要统计的根 ...

  9. python统计代码行数

    以前写了一个java的统计代码行数的小程序,最近在看python,于是就参考前辈的代码,写了一个统计文件夹下面各种程序的代码的小程序,这里贴出来供大家参考 参考链接: https://gist.git ...

随机推荐

  1. JMeter乱码问题的解决

    一.JMeter返回数据是乱码 解决办法是: 在JMeter安装路径的bin目录下,以记事本打开文件jmeter.properties, 找到Sampleresult.default.encoding ...

  2. 使用CXF开发RESTFul服务

    相信大家在阅读CXF官方文档(http://cxf.apache.org/docs/index.html)时,总是一知半解.这里向大家推荐一本PacktPub.Apache.CXF.Web.Servi ...

  3. JD2

    Business Requirement Support l Develops and communicates plan to manage vendor review of requirement ...

  4. (转)在Unity3D的网络游戏中实现资源动态加载

    原文:http://zijan.iteye.com/blog/911102 用Unity3D制作基于web的网络游戏,不可避免的会用到一个技术-资源动态加载.比如想加载一个大场景的资源,不应该在游戏的 ...

  5. cf 546C Soldier and Cards

    题目链接:C. Soldier and Cards Two bored soldiers are playing card war. Their card deck consists of exact ...

  6. linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

    linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 1 ...

  7. 我的一次Postgre数据库Insert 、Query性能优化实践

    一.前言 以前的系统由于表设计比较复杂(多张表,表与表直接有主从关系),这个是业务逻辑决定的. 插入效率简直实在无法忍受,必须优化.在了解了Postgre的Copy,unlogged table 特性 ...

  8. nginx的301与302如何配置

    转自:http://blog.sina.com.cn/s/blog_5d73ba76010145rr.html 首先看一个完整代码示例,关于nginx 301 302跳转的. 301跳转设置: ser ...

  9. BAT文件使程序具有以系统权限运行的效果

    @echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.sh ...

  10. 修改Tomcat标题栏内容

    你是否遇到过在一个OS任务栏中同时打开多个Tomcat启动程序窗口,这种情况下你会无法区分具体是哪个窗口启动哪个程序,以下方式可以实现Bat启动程序标题栏自定义. 打开Tomcat的Bin目录中,打开 ...