by Stephen Ball

Using git-blog

So if you know my work at all you know that I love writing good and comprehensive Git commits.

Until now all of that writing was locked up in my repos. Publicly available (for my public repos) but not exactly followable.

I’ve finally taken the time to write a [nifty script] called git-blog that accepts a commit hash — or defaults to the latest hash — and turns that commit into a markdown blog post in Strange Leaflet!

Because it’s got a git- prefix and its in my $PATH it means I can call it like another other git command.

$ git blog
$ git blog c09efbf

The posts are dropped into my directory for Strange Leaflet as draft posts. I have another script publish-blog-post that uses fzf to prompt me for draft posts that I’m ready to publish.


January 8, 2023