Fix error about "mono upload" without tracking branch
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
-
按 安装步骤 完成 Mono client 的安装
-
在任意项目比如 repo1 中新建分支、提交新的 commit
-
执行
mono upload
推送代码,推送失败:$ mono upload repo: error: no branches ready for upload
-
手动将
mono
分支切换为当前 MR 的fix-upload-cmd-about-branch-merge
$ cd .repo/repo/ && git checkout fix-upload-cmd-about-branch-merge && cd -
-
执行
mono upload
,推送成功!
由 路志远 编辑于