@staticmethod
  def add_git_remote(git_remote_name, remote_url, working_copy_dir,
                     subprocess_runner):
    for remote_name, url in Package.get_git_remotes(working_copy_dir,
                                                    subprocess_runner):
      if git_remote_name == remote_name:
        if remote_url != url:
          raise GitError(
              'Remote %s already exists with unexpected URL %s '
              '(expected %s)' % (git_remote_name, url, remote_url))
        return git_remote_name
    subprocess_runner.check_call(['git', 'remote', 'add', git_remote_name,
                                  remote_url], cwd=working_copy_dir)
    return git_remote_name
Add the git specified git remote if it doesn't already exist.
dataset/ETHPy150Open google/fplutil/disttools/push_package.py/Package.add_git_remote