米
首页
心情
图集
所有
搜索
登录
git统计代码提交行数
2023-11-21
17.74w热度
```go git log --since =2023-10-1 --until=2023-11-1 | wc -l ``` git bash中执行,排除了某文件夹 ``` git log --author="x@x.com" --since="2023-09-01" --until="2023-12-05" --pretty=tformat: --numstat -- . ":(exclude)generated" ":(exclude)statics/upload" | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' ``` ``` git log --author=ke.zengli --since =2023-10-1 --until=2023-11-20 | wc -l ``` Linux下运行 ``` git log --format='%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 ``` 统计每个人的代码提交行数 gitbash中执行 统计代码行数命令(示例): ``` git log --since ==2025-01-1 --until=2025-03-31 --author="ke.zengli" --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 }' - ``` 说明:since是开始日期,until是结束日期,author是git登录用户名 https://blog.csdn.net/carterslam/article/details/81162463
注:原创不易,转载请注明出处(
http://www.micuu.com/new/3574.html
),本站所有资源来源于网络收集,如有侵权请联系QQ245557979进行清除。
最后修改与 2025-01-07
上一篇:
文档汇总
下一篇:
PHPstorm 插件代码统计插件Statistic-统计项目代码文件数及代码行数
▶
珍藏视频
▶
10分钟高效燃脂
▶
30天高效瘦脸操
▶
5分钟缓解颈椎操
友人
→
微博
→
全民K歌
→
唱吧
→
今日头条
→
悠悠网
→
科技小锅盖
→
彼岸桌面
→
阮一峰
→
laravel社区
→
V2ex
→
掘金
+
更多