gum
gum copied to clipboard
git undo/git redo
Discuss: destructive vs. non-destructive.
Non-destructive undo:
- it could refuse to undo if it would be destructive
- it might ask “are you sure, y/n?” or require an “-f”
- it might store states which would be destroyed so that they are recoverable, even if that means adding some heavier infrastructure
- this could be a hack, like storing diffs or whatever you have to do, or a rewrite of part of git
- or it could actually create a new state which clones the state you’re trying to get back to, but preserves revision history, like reverting a Wikipedia article. The latter would be pretty heavy but i dunno – just throwing options out there