def __get_remote(repo, remote_name):
    """
    Get a Remote from a repo if it exists.

    :param repo: Repo object.
    :param remote_name: Remote name to get.
    :return: Remote if it exists. None otherwise.
    """
    remote = None
    for r in repo.remotes:
        if r.name == remote_name:
            remote = r
            break
    return remote
