undo previous commit and redo it properly via a patch file instead of