DotNet GitStats is a toolkit to build code statistic for git, it's built on top of libgit2 using DotNet. DotNet GitStats provide cross-platform command line tools that can be run on Windows, MacOS and Linux.
You can use this tool to generate a CSV file which can ben consumed easily using Excel, Power BI and any other data process tools. A sample Power BI report is provided with the repo.
libgit2sharp is a wonderful tool, it expose every git operation interface to DotNet and Mono which makes DotNet GitStats possible.
DotNet GitStats use libgit2sharp to extract git log
information and calculate line changes between commits, for example, lines added and lines deleted.
For ease of use, CSV or JSON formats are supported for you to analyze or visualize.
- Windows
- Linux
- MacOS
# windows
./DotNetGitStats.exe -d <local repo dir> -o <output file path>
# linux
./DotNetGitStats -d <repo dir> -o <output path>
# maxOS
./DotNetGitStats -d <repo dir> -o <output path>
# get a csv result file
./DotNetGitStats.exe -d repos\BoatHouse -o result.csv
# get a json result file
./DotNetGitStats.exe -d repos\BoatHouse -o result.json
CommitHash
current git comit idAuthorName
current commit's author nameAuthorEmail
current commit's author emailMessageShort
current commit's msg in short line formatAuthorDate
commit.Author.When.DateTimeLinesAdded
numbers of line added compared with parent commitLinesDeleted
numbers of line added compared with parent commit
DotNet GitStats is still at very early stage, please feel free to support issue or PR. Here are some ideas we are exploring down the track.
- Set up Github action for CI
- Add README content
- Create Power BI report using csv file