Skip to content

Instantly share code, notes, and snippets.

@kristoferjoseph
Created November 25, 2012 22:18
Show Gist options
  • Save kristoferjoseph/4145644 to your computer and use it in GitHub Desktop.
Save kristoferjoseph/4145644 to your computer and use it in GitHub Desktop.
git log output format for timeline.js
git log --reverse --date=short --pretty=format:'{%n "headline": "%H",%n "author": "%an <%ae>",%n "startDate": "%ad",%n "text": "%s "%n},' > ~/Desktop/json_log.txt
@kristoferjoseph
Copy link
Author

You will need to find and replace - with , to change the date from YYYY-MM-DD to YYYY,MM,DD
You will need to find and replace ' to ' in order to escape any single quotes
You will also need to remove any erroneous " inside the message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment