Created
January 19, 2018 13:01
-
-
Save anamewing/64c7cee29722b31d195d95fb1a7c237e to your computer and use it in GitHub Desktop.
git export log to json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git log \ | |
--date=local \ | |
--tags \ | |
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%cd",%n "message": "%f",%n "parentSha": "%P"},' \ | |
$@ | \ | |
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
perl -pe 's/},]/}]/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment