Resetting Repo after Detach