Export GIT LOG into an Excel file

2019-04-28 17:02发布

I have looked into the forum, but with no luck.

Requirement :

Run GIT LOG (format) command and write the results into an Excel File .

I have seen examples wherein with GIT Log command, data can be written into a CSV, but formatting is double the effort.

Any utility or approach would be helpful.

Thanks Milind

标签: git logging
1条回答
不美不萌又怎样
2楼-- · 2019-04-28 17:25

Git gives your the control on how to format the log output using pretty option. Check this out:

git log --pretty=format:%h,%an,%ae,%s

This prints the log in the format of (hash [abbreviated], author name, author email, subject).

To see the full list of format options:

git help log

And scroll down until you see the list of format options.

To redirect the output, use > redirection operator as follows:

git log --pretty=format:%h,%an,%ae,%s > /path/to/file.csv
查看更多
登录 后发表回答