Skip to content

Instantly share code, notes, and snippets.

@lance
Forked from csantanapr/git-stats-dux.sh
Last active December 7, 2022 20:10
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 lance/38016dcaeef6cab41f3af59a1a73036d to your computer and use it in GitHub Desktop.
Save lance/38016dcaeef6cab41f3af59a1a73036d to your computer and use it in GitHub Desktop.
Knative DUX WG git stats
out=$(mktemp)
date=${1:-2022-06-23}
echo "Getting contributions to docs since $date"
REPO=git@github.com:knative/docs.git
tmpdir=$(dirname $(mktemp -u))
cd ${tmpdir}
git clone ${REPO} --quiet
pushd "$(basename "${REPO}" .git)" >> /dev/null
git log --pretty=format:"%ad,%an" --date=short > ../docs.raw.txt
popd > /dev/null
cat docs.raw.txt | awk -F',' '$0 >= "2022-06-23"' > 3months.raw.txt
cat 3months.raw.txt | cut -f2 -d, | sort | uniq -c | sort -k1 -n -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment