Exporting GIT history to a CSV/Excel file

There are many tools to compute stats from your GIT repositories, but sometimes, you may just want to export it to Excel and make your own quick and direty stats.

the git log command, with pretty print, is your friend. For example, the following command will display the commit date, hash, commiter name and email, and the commit message :

git log --pretty=format:%cI,%h,%an,%ae,%s > commits.csv

The pretty format documentation is available here : https://www.git-scm.com/docs/git-log#_pretty_formats

Leave a Reply

Your email address will not be published. Required fields are marked *