Octostat extracts and converts the Git log of a repo into an SQLite database for easy querying.
gem install octostat
octostat <OPTIONAL_PATH_TO_REPO>
To specify the name of the output database: octostat path/to/repo --db=new_name.sqlite
The gem is available as open source under the terms of the MIT License.