Skip to content

Instantly share code, notes, and snippets.

View BlockChainCaffe's full-sized avatar
🎯
Focusing

BlockChain Caffè BlockChainCaffe

🎯
Focusing
View GitHub Profile
@dmegorov
dmegorov / git-log2json.sh
Last active October 20, 2021 13:48 — forked from textarcana/git-log2json.sh
Convert Git logs to JSON
#!/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:' \