def has_remote_branch?(branch)
    out = execute("git ls-remote --heads")
    out.split("\n").each do |l|
      return true if l.split(/\s+/)[1] == "refs/heads/#{branch}"
    end
    false
  end
def has_remote_branch?(branch)
    out = execute("git ls-remote --heads")
    out.split("\n").each do |l|
      return true if l.split(/\s+/)[1] == "refs/heads/#{branch}"
    end
    false
  end
check whether remote branch exists