      cloudlog.info("Running update")
  
      if new_version:
        cloudlog.info("git reset in progress")
        r = [
          run(["git", "reset", "--hard", "@{u}"], OVERLAY_MERGED, low_priority=True),
          run(["git", "clean", "-xdf"], OVERLAY_MERGED, low_priority=True ),
          run(["git", "submodule", "init"], OVERLAY_MERGED, low_priority=True),
          run(["git", "submodule", "update"], OVERLAY_MERGED, low_priority=True),
        ]
        cloudlog.info("git reset success: %s", '\n'.join(r))
  
        if AGNOS:
          handle_agnos_update(wait_helper)
 
</s> remove   new_version: bool = cur_hash != upstream_hash
 </s> add   new_version = cur_hash != upstream_hash </s> remove 
 </s> add   connect(uiState(), &UIState::offroadTransition, updateBtn, &QPushButton::setEnabled);

  branchSwitcherBtn = new ButtonControl(tr("Switch Branch"), tr("ENTER"));
  connect(branchSwitcherBtn, &ButtonControl::clicked, [=]() {
    QString branch = InputDialog::getText(tr("Enter name of new branch"), this);
    if (branch.isEmpty()) {
      params.remove("SwitchToBranch");
    } else {
      params.put("SwitchToBranch", branch.toStdString());
    }
    std::system("pkill -1 -f selfdrive.updated");
  });
  connect(uiState(), &UIState::offroadTransition, branchSwitcherBtn, &QPushButton::setEnabled);
      cmds = [
        ["git", "reset", "--hard", "@{u}"],
        ["git", "clean", "-xdf"],
        ["git", "submodule", "init"],
        ["git", "submodule", "update"],
      cloudlog.info("Running update")
  
      if new_version:
        cloudlog.info("git reset in progress")
      cmds = [
        ["git", "reset", "--hard", "@{u}"],
        ["git", "clean", "-xdf"],
        ["git", "submodule", "init"],
        ["git", "submodule", "update"],
      cmds = [
        ["git", "reset", "--hard", "@{u}"],
        ["git", "clean", "-xdf"],
        ["git", "submodule", "init"],
        ["git", "submodule", "update"],
      cmds = [
        ["git", "reset", "--hard", "@{u}"],
        ["git", "clean", "-xdf"],
        ["git", "submodule", "init"],
        ["git", "submodule", "update"],
      cmds = [
        ["git", "reset", "--hard", "@{u}"],
        ["git", "clean", "-xdf"],
        ["git", "submodule", "init"],
        ["git", "submodule", "update"],
      cmds = [
        ["git", "reset", "--hard", "@{u}"],
        ["git", "clean", "-xdf"],
        ["git", "submodule", "init"],
        ["git", "submodule", "update"],
        ]
        cloudlog.info("git reset success: %s", '\n'.join(r))
  
        if AGNOS:
          handle_agnos_update(wait_helper)
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 updated: add branch switching (#25200)

* switch param

* add to ui

* fix that

* fetch for new branch

Co-authored-by: Comma Device <device@comma.ai> 
selfdrive/updated.py