code: def _set_remote(self, name, url):
          
          remotes = self._get_remotes()
          exising_url = remotes.get(name)
          if exising_url == url:
              logger.info('Remote already exists %s <%s>', name, url)
              return
          if not exising_url:
              logger.info('Adding remote %s <%s>', name, url)
              self.log_call(['git', 'remote', 'add', name, url], cwd=self.cwd)
          else:
              logger.info('Remote remote %s <%s> -> <%s>',
                          name, exising_url, url)
              self.log_call(['git', 'remote', 'rm', name], cwd=self.cwd)
              self.log_call(['git', 'remote', 'add', name, url], cwd=self.cwd)
docs: Add remote to the repository. It's equivalent to the command
          git remote add <name> <url>
  
          If the remote already exists with an other url, it's removed
          and added aggain