Skip to content

Fix error about "mono upload" without tracking branch

路志远请求将fix-upload-cmd-about-branch-merge合并到main-jh

What does this MR do and why?

What

解决 mono upload 时的报错:

$ mono upload
repo: error: no branches ready for upload

Why

问题引自:MR - No longer track the main branch

我们创建新分支时不再自动设置 Tracking 分支,mono upload 在推送代码时,依赖 Tracking 分支,所以造成报错。

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. 安装步骤 完成 Mono client 的安装

  2. 在任意项目比如 repo1 中新建分支、提交新的 commit

  3. 执行 mono upload 推送代码,推送失败:

    $ mono upload
    repo: error: no branches ready for upload
  4. 手动将 mono 分支切换为当前 MR 的 fix-upload-cmd-about-branch-merge

    $ cd .repo/repo/ && git checkout fix-upload-cmd-about-branch-merge && cd -
  5. 执行 mono upload,推送成功!

iShot_2023-08-29_17.09.53_

路志远 编辑于

合并请求报告