Given the interest here I wanted to mention an idea I had for implementing this as a standalone utility:
- Init a bare repo in
projectroot/.ghistory
+ a background job that auto-commits to it with high frequency (< 1s) without touching the primary working tree - Derive tree of file edits/states from ghistory repo for navigation/checkout, maybe as a git tree
- Periodically compress/clean the ghistory tree to most 5min intervals
I know it's a fundamentally different approach & requires saving, but it'd have the benefits of being editor agnostic and eternal, as well as automating away the need for anxious WIP
commits.
IDK if I'll ever implement this myself so I wanted to put the idea out into the aether.
Edit: In retrospect a git notes namespace would probably make more sense (https://alblue.bandlem.com/2011/11/git-tip-of-week-git-notes.html)
Interesting idea.
So would you detect "undo"s entirely by context? Like in the compress/clean step? I suppose you could look at the content hash to see if there's a state which previously occurred.