Take repo back to (mostly) original state.