Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

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

$
0
0

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.

gitstats

image

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

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

    image
  • 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:

    image
  • 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:

image

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

    image
  • 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:

    image
  • Add this folder to the system path:

    image
  • 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!


Filed under: Programming Tagged: example, git, gitstats, grep is not recognized as, how to, troubleshooting, tutorial, wc is not recognized as, windows

Viewing all articles
Browse latest Browse all 284

Trending Articles