I want to export a list of all commits in a repository (date-time, author, comment) into a file (of any format: CSV, XML, JSON, XLS etc.) which I will then analyse in a spreadsheet.
I want to compute stats such as:
This is for a high-level management report so non-technical managers can understand the size of effort without blinding them with actual code & architecture details.
There seems to be no obvious way to do this. I find a few complicated ideas in Git command line documentation but none that yields this info. Admittedly I am not an expert in Git.
Does anyone know a simple easy way to get high-level per-commit info out of VSTS / Azure DevOps or Git command line?
Intuitively this should be really easy but so far I have to copy/paste each screenful of commits into a spreadsheet and build up the info in steps. Crazily manual process. But it's all viewable in the Azure Devops browser interface under Commits so why can't I export it all at once?
Surely I am not the only person on earth who wants to analyse commit activity in this way! But so far I can find nothing online.
Thanks to @Philippe for guiding to the answer:
git log --pretty=format:%h,%an,%aD,%s > ./GitLog.csv
GitLog.csv
file to appear and open in spreadsheet programFormat option meanings:
%h
= commit hash%an
= Author Name%aD
= commit date%s
= subject (comment of commit)See here for more: https://git-scm.com/docs/pretty-formats and https://devhints.io/git-log-format
This solution doesn't give number of files or size of each commit, but it's a strong start.
(Philippe if you can move your comment in a proper answer rather, I'll give you the credit for providing the answer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With