Rewrite master with revert