Listing Git Authors
How can I find (unique) contributors to a git repo? Here's a way using SQL...

How can I find (unique) contributors to a git repo?
The first answer on this StackOverflow question offers:
git log --format="%an" | sort -uWhich is pretty cool. Simple and easy to understand. The git log command takes a —format flag which lets us supply a format string (where %an indicates author name).
It returns just the author name for every commit in the current history, sort -u then de-duplicates (and sorts) by line (using the piped input).
But here’s another way! And it’s a shameless plug for a project I’ve started called gitqlite, which provides a SQL interface for ad-hoc querying of git information.
gitqlite "SELECT DISTINCT author_name FROM commits"Returns a similar output. If alphabetical ordering matters, try:
gitqlite "SELECT DISTINCT author_name FROM commits ORDER BY author_name"Or if you want a sorting by total # of commits:
gitqlite "SELECT author_name, count(*) FROM commits GROUP BY author_name ORDER BY count(*) DESC"That’s just the beginning! I hope to collect more use cases as I continue working on gitqlite. If you have ideas, please reach out!
