Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.4k points)

I need a list of all the files which were committed in the last couple of days in an excel with the user name who committed the file, date, list of files committed.

I have tried this command.

git log --after "11-06-2019" --before "28-06-2019" --pretty="%cn committed %h on %cd for %s" --name-only > master.xls

the excepted output is formatted excel, here I am getting a list of the files, user name, date in one single column.

1 Answer

0 votes
by (41.4k points)
edited by

The closest I could get was:

user,Wed Jun 26 11:16:41 2019 +0200,

lib/script.py

user,Tue Jun 25 15:32:21 2019 +0200,

lib/script.py

I get it with:

git log --after "11-06-2019" --before "28-06-2019" --pretty="%cn,Í,%b" --name-only > master.csv

Instead, someone knows a better way, you'll have an extra-step to replace \n\n by a ,.

Also, use CSV instead of .xls. xls are binary files. You are not supposed to write text directly in it.

Check out this Git Tutorial to know more.

Browse Categories

...