Why the heck would you want to do this. Using git as your undo chain sounds like a pretty awful thing to do.