Skip to content

Instantly share code, notes, and snippets.

@miamibc
Created January 31, 2022 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miamibc/06a83bb38f8aaefed4f86523c439d3ea to your computer and use it in GitHub Desktop.
Save miamibc/06a83bb38f8aaefed4f86523c439d3ea to your computer and use it in GitHub Desktop.
# change lib/ apps/ to folders you worked in, remove grep php if you work not only with php files
git ls-tree --name-only -r HEAD lib/ apps/ | grep 'php' | xargs -n1 git blame -t -c -e | awk '{print $2}' | sort | uniq -c
# this will bring you number of lines each author contributed
# example:
# 14262 (<author@example.com>
# 364 (<noob@example.com>
# 3483 (<another@example.com>
# 36849 (<mastah@example.com>
# 48434 (<miami@blackcrystal.net>
# 12 (<user-ThinkCentre-M90p.(none)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment