Office of Secret Intelligence

Who taught you to be a spy, fucking Gallagher!?!

Snippet: Prepend git log To Your Changelog

git log --pretty=tformat:"  * [%ad - %s%n%b](http://github.com/dhoss/treeify/commit/%H)" --since="$(git show -s --format=%ad `git rev-list --tags --max-count=1`)"|cat - Changes.md > /tmp/out && mv /tmp/out Changes.md 

 

 This basically tells git to show all commits since the last tag, pipe them to cat, which will concatenate the new changes on top of the old, redirect the output to a temp file, and then rename that temp file back to the changelog file.

 

An exercise left to the reader would be to modify this to prepend the version number/tag name to the change set so that it's easily discernable what changes belong where.


Back