Skip to content

查看 Git 代码更新量

Published: at 09:34 AMSuggest Changes

查看当天更新了多少代码

git log --since="1 day ago" --format=tformat: --numstat | awk 'NF==3 {plus+=$1; minus+=$2} END {printf "Added lines: %s\nDeleted lines: %s\nTotal lines changed: %s\n", plus, minus, plus-minus}'

有个简单的

git log --since="1 day ago" --stat

或者

git log --since="1 day ago" --stat | grep -E "files? changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed: ", files, "\nlines inserted: ", inserted, "\nlines deleted: ", deleted}'

还有个命令是

git log --stat

Previous Post
Webpack Alias 别名配置
Next Post
CSS flex 布局问题:子元素宽度和 `flex: 1` 解释