Skip to content

Instantly share code, notes, and snippets.

@venkatesh22
Forked from xeoncross/gitstats.sh
Created April 3, 2019 09:28
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 venkatesh22/b78bab87493f2175f74a1e7412034f08 to your computer and use it in GitHub Desktop.
Save venkatesh22/b78bab87493f2175f74a1e7412034f08 to your computer and use it in GitHub Desktop.
Git - calculate how many lines of code were added/changed by someone
# Run this in the project repo from the command-line
# http://stackoverflow.com/a/4593065/99923
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment