For all I know this already exists and I just was unable to google it up. Assuming it doesn’t,
tmdiff allows you to perform a command line diff on a text file against a time machine version.
Usage: tmdiff (--list) tmdiff [offset: 1] path
The list option just lists the dates for the backups in reverse chronological order. Supply a path to diff, e.g.
tmdiff Style600-Control\ Flow.md
It defaults to using the “but last” backup offset of 1. If you want to use the most recent backup, use 0 instead, or any number moving further back in time as the value increases:
tmdiff 0 Style600-Control\ Flow.md tmdiff 3 Style600-Control\ Flow.md
I hope this is handy for someone out there on the opposite side of the Intertube, especially since version control is baked into stuff like TextEdit. Do let me know if you use it.