Skip to content

Instantly share code, notes, and snippets.

@gvd
Created January 5, 2018 04:27
Show Gist options
  • Select an option

  • Save gvd/d38e38d09f8838d5a9f9418305277f90 to your computer and use it in GitHub Desktop.

Select an option

Save gvd/d38e38d09f8838d5a9f9418305277f90 to your computer and use it in GitHub Desktop.
Git statistics for an author in a specific directory
git log --numstat --author="John Doe" --format=tformat: directory | grep ".*\.cpp$\|.*\.h$\|.*\.py$" | awk '{added += $1; removed += $2}END{printf "Added:\t\t%s\nRemoved:\t%s\nDelta:\t\t%s\nRatio:\t\t%s\n", added, removed, (added-removed), (added/removed) }' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment