def remote_set(self, url, name='origin'):
        """Set remote with name and URL like git remote add.

        :param url: defines the remote URL
        :type url: str
        :param name: defines the remote name.
        :type name: str
        """

        url = self.chomp_protocol(url)

        if self.remote_get(name):
            self.run(['remote', 'rm', 'name'])

        self.run(['remote', 'add', name, url])
        return self.remote_get(remote=name)
Set remote with name and URL like git remote add.

        :param url: defines the remote URL
        :type url: str
        :param name: defines the remote name.
        :type name: str