Updated restore script to perform a cleanup and reinitialization of the remote repo