Skip to content

Instantly share code, notes, and snippets.

@myuanz
Created January 2, 2020 02:51
Show Gist options
  • Save myuanz/2cb35fb18b752a15fa57550525586268 to your computer and use it in GitHub Desktop.
Save myuanz/2cb35fb18b752a15fa57550525586268 to your computer and use it in GitHub Desktop.
View git add and delete lines / 查看 git 增删行数
git log --author="myuanz" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s|%.2f%%, removed lines: %s|%.2f%%, total lines: %s\n", add, add/(add + subs)*100, subs, subs/(add + subs)*100, loc }' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment