git - How much of my code is still around? -


strange question, pretty reasonable 1 think. there's project started several years ago couple hundred lines of code. amazingly, since it's grown huge, robust project i'm proud of.

now, have question pops head:

how of code still around?

almost vast majority of code has been rewritten @ point, feels should possible have git give me picture of what's still around.

now, i've looked on basic level, can't find else along these lines, though of github's charts helpful.

any ideas?

so git blame way go. here how can calculate number of lines changed each author in current revision

git ls-tree -r head --name-only \     | xargs -i{} git blame --line-porcelain {} \     | sed -n 's/^author //p' \     | sort \     | uniq -c \     | sort -rn 

which give

15492 alice  3406 bob   100 carol 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -