git工作量统计
#!/bin/bash
function count() {
local insert=0
local delete=0
while read line ;do
current=`echo $line| awk -F',' '{printf $2}' | awk '{printf $1}'`
if [[ -n $current ]]; then
insert=`expr $insert + $current`
fi
current=`echo $line | sed -n 's/.*, //p' | awk '{printf $1}'`
if [[ -n $current ]]; then
delete=`expr $delete + $current`
fi
done < .tmp.count
echo "$insert insertions, $delete deletions"
} function countAll() {
git log --author=wxy --shortstat --pretty=format:"" | sed /^$/d >.tmp.count
count;
rm .tmp.count
} function countToday() {
local current=`date +%s`;
local begin=`date +%Y-%m-%d |xargs date +%s -d`;
local minutes=$(($current - $begin)); git log --author=wxy --since="$minutes seconds ago" --shortstat --pretty=format:"" | sed /^$/d >.tmp.count
count;
rm .tmp.count } function countOneDay() {
git log --author=wxy --since="1 days ago" --shortstat --pretty=format:"" | sed /^$/d >.tmp.count
count;
rm .tmp.count } if [[ ! -n $1 ]] || [[ $1 = "all" ]] ; then
countAll;
elif [[ $1 = "oneday" ]]; then
countOneDay;
elif [[ $1 = "today" ]]; then
countToday;
else
echo "args: all | oneday | today";
fi git log --graph --date=yyyymmdd --pretty=format:'%ae%cd%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
git log --graph --date=yyyymmdd --pretty=format:'%ae%cd%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
git log --pretty=format:'%ci %an %s' > work.txt
git工作量统计的更多相关文章
- git代码统计
1.统计一段时间的代码量 git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; gi ...
- [Git] git代码统计
copy : https://www.cnblogs.com/liyropt/archive/2012/12/31/2841053.html 命令行 查看git上的个人代码量: git log --a ...
- git 代码统计
查看git上的个人代码提交量: git log --author="Marek Romanowski" --since="2019-01-01" --no-me ...
- Git常用统计命令
上周要做个汇报PPT涉及到个人对项目贡献量,在网上搜集了些常用统计命令,总结如下: 1.统计代码提交量(包括添加.删除): git log --author="$(gitconfig--ge ...
- git如何统计代码行数
1.根据用户名时间段统计 git log --author="username" --since=2018-01-01 --until=2019-12-31 --pretty=tf ...
- Git diff 统计代码更改数量
1. git diff HEAD~2 获取最近两次提交的具体不同 包括增删的文件以及行数以及每行具体的改动 2. git diff --stat 获取文件更改的个数 增加行数 删除行数 3. git ...
- git commit 统计
git log --author="username" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; lo ...
- 基于Windows的git代码统计工具GitStats
参考: https://blog.csdn.net/windfromthesouth/article/details/72961525
- GIT命令行统计代码提交行数
项目中遇到写报告的时候要反馈某个人或者某个功能的代码量,又没有集成CI这些插件,可以简单的用GIT命令统计下代码提交量: --统计某个人的提交代码 git log --author="old ...
随机推荐
- Linux Linux程序练习六
题目:实现一个so库文件名称为listupper.so,so文件中实现一个函数,函数名为void upper(const char *src, char *desc),调用update后将参数src所 ...
- U3D assetbundle加载与卸载的深入理解
using UnityEngine; using System.Collections; using System; public class testLoadFromAB : MonoBehavio ...
- U3D临时文件GICache巨大
C:\Users\asus\AppData\LocalLow\Unity\Caches\GiCache 看名字似乎是全局光的缓存,可以通过Edit - Preference - GI Cache,选中 ...
- Eclipse里面启用genymotion
E:/Users/zhuxuekui/AppData/Local/Android/sdk as里面的SDK目录 1.打开eclipse并从云仓库里面下载genymotion插件 注意:这里面有一个坑, ...
- Spring系列: 使用aop报错:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle
写了个最简单的aop例子 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...
- [CareerCup] 5.8 Draw Horizonatal Line 画横线
5.8 A monochrome screen is stored as a single array of bytes, allowing eight consecutive pixels to b ...
- sass,compass让开发效率飞起
最近开始学习并且使用,发现使用它写起css来真的是各种爽 安装sass,compass sass是依赖于ruby的,必须先安装Ruby,点击下载 下载完ruby之后,使用命令行安装sass ...
- 利用php实现文件迁移重命名
首先表明,这是一个悲伤的故事. 暑假来临,学校安排我们到某软件外包公司实习,想想不用面试也是蛮方便的,可以借此机会向大牛学习学习,虽然没有工资(据说学校还交了600块的保险),但想想还是蛮期待的,但真 ...
- Highcharts candlestick(K线图)案例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- http请求过程简要
一次http请求主要分为3个大步. 建立tcp连接. 这里就发生了经典的tcp三次握手.做个类比解释下,tcp好比http的秘书,和厂家(服务器端)做买卖.老板(http)叫秘书(tcp)去联系一下, ...