Introduct git_revert to revert a single commit
clean up state metadata more consistently