One could probably script a customizable text editor (Emacs, Sublime Text, etc) to automatically init and commit on save to a local revision control repository.
That's kind of a hack though. OS X's Time Machine feature sounds similar to what you want, if it watched for changes constantly instead of every time period (hour I think?). Does anybody know of some open source project similar to Time Machine? I imagine it could be adapted to such a task.