Be more clever when dealing with existing repos

Instead of blindly trying to do "git remote update",
remove all existing remotes and set up a new origin with --mirror
flag.