Skip to content

Instantly share code, notes, and snippets.

@gonaumov
Last active December 28, 2020 13:10
Show Gist options
  • Save gonaumov/802e974c55b0d9794207caa3a20ea0f6 to your computer and use it in GitHub Desktop.
Save gonaumov/802e974c55b0d9794207caa3a20ea0f6 to your computer and use it in GitHub Desktop.
How to get report for developers commit it a repository using Linux command line
#!/usr/bin/env bash
git log | egrep -o "<[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}>" | sort | uniq -c | sort -nk1 -r | awk 'BEGIN {printf "Commits reports from developers:\n"; total=0; } { total+=$1; print } END { printf " " total " total commits\n" }' > report.txt
@gonaumov
Copy link
Author

I love Linux command line. Here is an example how to get report for developers commits in a Git repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment