More than a year later and I lost that tool with the move to a new computer, but I was asked today to see some of those statistics again. Alas, the brew install command I used last time yielded no results (I guess it got moved or something) so I spent some time trying this and that until I was again able to run a report.
These steps are obvious in retrospect, but I don't want to forget them so I'm going to write them down:
- Create a symbolic link to python2
- gitstats requires python2, but the latest version of macOS doesn't have it. To further add to some confusion macOS has a System Integrity Protection feature which requires us to make a symbolic link slightly differently.
sudo ln -s /usr/bin/python2.6 /usr/local/bin/python2
- Next install GnuPlot which is a dependency used in gitstats
brew install gnuplot
- Now clone the repo
git clone git://github.com/hoxu/gitstats.git
- An run it
- cd gitstats
.gitstats ~/Projects/source-repo ~/Projects/source-repo/target/stats
.gitstats [path to repo] [path to output dir]
Hope this helps.