Generating statistics from Git repository

commits per author

git shortlog -s -n 

Beside GitStats (git history statistics generator) mentioned by xyld, written in Python and requiring Gnuplot for graphs, there is also

  • gitstat (SourceForge) project (web-based git statistics interface), written in PHP and Perl,
  • Git Statistics, aka gitstats (metrics framework designed to gather statistics on git repositories), written in Python, result of git-statistics project at Google Summer of Code 2008 This is not a web app
  • gitinspector Is a rather new, CLI based Python tool for generating nice reports
  • Hercules - native app without dependencies, written in Go, which specializes in advanced analysis types.

I'm doing a git repository statistics generator in ruby, it's called git_stats.

You can find examples generated for some repositories on project page.

Here is a list of what it can do:

  • General statistics
    • Total files (text and binary)
    • Total lines (added and deleted)
    • Total commits
    • Authors
  • Activity (total and per author)
    • Commits by date
    • Commits by hour of day
    • Commits by day of week
    • Commits by hour of week
    • Commits by month of year
    • Commits by year
    • Commits by year and month
  • Authors
    • Commits by author
    • Lines added by author
    • Lines deleted by author
    • Lines changed by author
  • Files and lines
    • By date
    • By extension

If you have any idea what to add or improve please let me know, I would appreciate any feedback.