Skip to content

Instantly share code, notes, and snippets.

@russomi
Created October 13, 2013 16:01
Show Gist options
  • Save russomi/6963862 to your computer and use it in GitHub Desktop.
Save russomi/6963862 to your computer and use it in GitHub Desktop.
git alias to output git log as json
#Add this to your .gitConfig file in your .git folder
#To to execute type at git bash: git log-json > ChangeLog.json
#It will save the output to a file named ChangeLog.json
#You can use this file to create your own pretty version of the ChangeLog
[alias]
log-json = !git log --pretty=format:'\"%h\": {%n \"commit\": \"%H\",%n \"author\": \"%an <%ae>\",%n \"date\": \"%ai\",%n \"message\": \"%s\"%n},'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment