- 统计从指定日期到现在提交的代码行数,并且排除Pods目录的更改:
git log --author="$(git config --get user.name)" --since='2018-01-01' --pretty=tformat: --numstat ":(exclude)Pods" | 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="$(git config --get user.name)" --since='2018-01-01' --no-merges --oneline | wc -l