How to use GitStats in Windows: A step-by-step tutorial

18 Sep

GitStats is a handy tool for analysis and statistics for a git repository. It is a statistics generator for git repositories, which produces some interesting statistics from the history of it. Currently HTML is the output format.



In order to use it in windows, follow the below steps:

  • Install Python, and add python path to the system path:


  • Download or clone the source code from here
  • Extract the source code to a folder if you download the zip file, change directory to the local source code folder, where you cloned/unzipped the source code to:
  • Now if you run below command:

python git-stats InputPathOfSomeGitRepo OutputReportFolderName

  • You will find below error occurs:


  • To solve this, download grep for windows here (or this direct link) and extract it to a folder, add the this path to system path:


  • Re-run the above command, you will see another error pops up:


  • To solve this, you need add the command wc.exe’s path to the system path. Luckily if you installed git for windows, you will find it at the bin\ folder there:


  • Add this folder to the system path:


  • Re-run the command, now everything works:
  • Open the GitStats-master\OutputReportFolderName folder, double click the index.html, you will see the statistics for the git repositoy!

Enjoy and happy coding and analyzing the code repo!

Leave a comment

Posted by on September 18, 2016 in Programming


Tags: , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: