Thanks to Jonathan Nieder.
These have more comments than the old examples and human-readable error messages. More tutorial-like examples are needed but these are a start.