From start to finish it took me 20 minutes. Everything is very straightforward except for the part about actually installing GPG. It turns out that if you have Homebrew installed, this is the fastest way:

brew install gnupg gnupg2

And yes, I’m literally writing this article because I want to push a commit to GitHub and test my GPG signature.

Update: here’s a followup post.