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 | |
# Usage: | |
# git log2json # for the basic commit info | |
# git log2json --name-only # for the same plus changed file list | |
# | |
# Based on https://gist.github.com/textarcana/1306223 | |
git log \ | |
--pretty=format:'%n{%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f":FILES:' \ |