Maybe it makes sense to integrate the editor’s auto-save with git, so that every file system save call is paired with a git commit (referenced by time stamp). Whenever the user manually snapshots a commit with a message/tag (or after some period), the intervening commits could be compacted. This also has the advantage of enabling a seamless undo experience between the small changes (using something like tree undo) and big changes (using the git commit tree).