Git changelog generator

When I’m preparing a new release of one of my plugins, its Git commit history is a great starting point to use when writing the changelog.

Rather than dealing with a bunch of parameters in git log, I use a simple Git alias which generates a plain list of the commit messages between the previous tag and the current HEAD. I can then copy and paste this into my changelog, and go from there.

[alias]
	changelog = "!_() { t=$(git describe --abbrev=0 --tags); git log ${t}..HEAD --no-merges --pretty=format:'* %s'; }; _"

Add it to your ~/.gitconfig file and then simply run git changelog to get your list of commit messages.

2 thoughts on “Git changelog generator

Leave a Reply to Zack Katz Cancel reply

Your email address will not be published. Required fields are marked *