学无先后,达者为师

网站首页 编程语言 正文

git统计当前项目代码行数

作者:沉、睡 更新时间: 2022-01-31 编程语言

git统计当前项目代码行数

在项目根目录输入以下代码

git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat --after="2021-04-01 00:00:00" --before="2021-04-30 00:00:00" | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done

原文链接:https://blog.csdn.net/zz975896590/article/details/119991177

栏目分类
最近更新