GitStats: Git history statistics generator

GitStats is a statistics generator for GIT repositories written in Python. Gitstats examines the repository and produces interesting statistics from the codebase, its output format is HTML. Here are some examples of gitstats output.

GitStats Features
Here is a list of some statistics generated currently:

  • General statistics: total files, lines, commits, authors.
  • Activity: commits by hour of day, day of week, hour of week, month of year, year and month, and year.
  • Authors: list of authors (name, commits (%), first commit date, last commit date, age), author of month, author of year.
  • Files: file count by date, extensions
  • Lines: Lines of Code by date

GitStats How to Install

GitStats requires Python-2.6+, and Gnuplot. The installation of the very latest gitstats can as simple as:

git clone git://

To generator statistics of a given repositories, we need to clone it first, the run the command to parse it:

$ git clone git://
$ python26 gitstats webdis output
$ \ls output
activity.html              day_of_week.dat     hour_of_day.png
arrow-down.gif              day_of_week.plot     index.html
arrow-none.gif              day_of_week.png     lines.html
arrow-up.gif              domains.dat          lines_of_code_by_author.dat
authors.html              domains.plot     lines_of_code_by_author.plot
commits_by_author.dat         domains.png          lines_of_code_by_author.png
commits_by_author.plot         files_by_date.dat     lines_of_code.dat
commits_by_author.png         files_by_date.plot     lines_of_code.plot
commits_by_year.dat         files_by_date.png     lines_of_code.png
commits_by_year_month.dat   files.html          month_of_year.dat
commits_by_year_month.plot  gitstats.cache     month_of_year.plot
commits_by_year_month.png   gitstats.css     month_of_year.png
commits_by_year.plot         hour_of_day.dat     sortable.js
commits_by_year.png         hour_of_day.plot     tags.html

Then you can copy these files to a web directory and visit the index.html for details.

Share Button

Leave a comment

Your email address will not be published. Required fields are marked *