Skip to content

Instantly share code, notes, and snippets.

@ghinda
Last active October 17, 2023 10:16
Show Gist options
  • Star 35 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save ghinda/722d0ebebbee7183fea2 to your computer and use it in GitHub Desktop.
Save ghinda/722d0ebebbee7183fea2 to your computer and use it in GitHub Desktop.
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
@phily245
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=;

@emcarson
Copy link

Very useful, thanks!

@avs099
Copy link

avs099 commented Oct 31, 2017

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

@gabrielsimas
Copy link

gabrielsimas commented Feb 9, 2018

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

@flockonus
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

@AdarshKale
Copy link

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

@rkvarra
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