获取代码提交用户 git log --format='%aN'| sort -u | while read name; do echo -en "$name\t"; done; 获取代码提交文件的修改情况 git log --author=forwardhuan --pretty=tformat: --numstat 获取代码提交文件的修改情况(过滤文件类型) git log --author=forwardhuan --pretty=tformat: --numstat | grep "\(.py$\)" 查询某段时间所有用户提交的代码量(py文件) git log --format='%aN'| sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --since="2023-01-01" --until="2023-12-31" --numstat | grep "\(.py$\)" | awk '{add +=$1; subs += $2; loc += $1-$2} END {printf "新增行数: %s, 移除行数: %s, 总行数: %s\n", add, subs, loc}'; done;