Reputation: 27
I need to download commit data of an open source project in an spreadsheet file. Is there any way to extract the commit data (Commit ID
, file changes
, #LOC addition
, #LOC deletion
) from GitHub to spreadsheet?
Upvotes: 1
Views: 588
Reputation: 350
If you have the repo cloned anywhere, the following git command below provides info about commit, author name/date and the stats summary of the commit. You could run the command and store the output in a CSV file.
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --numstat > summary.csv
The output should be something like:
69bbf3e;Firstname Last name;Tue Aug 29 11:21:19 2017 -0400;Commit headline
2 0 dir-a/file-a
The numbers before the file path indicate the number of additions and deletions to a file
Upvotes: 2