Format Git Logs
I have to build a listbox for one customer app showing the version history of their app. The easiest way is obviously to first upload the git log into a database, but the standard log looks like this:
Beautiful, but not what I needed. I wanted a csv format for easy upload to my database and obviously the date should be in SQL format.
The following code will help you on this. Just run it in the root folder of your GIT enabled project in a terminal windows on your macOS.
git log --pretty=format:'%ad;%s' --date=format:'%Y-%m-%d %H:%M:%S' > YOURPATH/myGitLog.txt
This will provided me with the desired output for an easy upload to a database and to go from there.
Sign in or become a blog.xojoDOCs.com member to join the conversation.
Just enter your email below to get a log in link.