@staticmethod
def get_remote(repo, name):
    """Return the git.Remote object base on the name."""
    for remote in repo.remotes:
        if remote.name == name:
            return remote
    return None
