Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
git csv export of commits in the last month
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv
Copy link

phily245 commented May 3, 2016

If the file fails to open in Excel, add the following on a new line at the top of the file: sep=;

Copy link

Very useful, thanks!

Copy link

avs099 commented Oct 31, 2017

add "--all" to get all commits from all branches

Copy link

gabrielsimas commented Feb 9, 2018

Thank you... you help me to create my Dataset...

Copy link

Thank you!
If the text got no commas (not guaranteed) using , as separator makes it easier to parse CSV
--date=short removes precision but makes easier to parse (Y-M-D)
git log --since='last year' --date=short --pretty=format:'%h,%an,%ad,%s' > ~/log.csv

Copy link

Thanks a Lot!!!
How to add multiple authors?

Copy link

rkvarra commented May 1, 2022

Thanks a Lot!!! How to add multiple authors?

Probably you are looking for this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment