【发布时间】:2016-03-29 03:23:15
【问题描述】:
我的 git 存储库中没有一个名为 master 的分支,但是当我执行 post-review 命令(git 的 rbtools 插件)时,它指向 master 分支,尽管我指向 mainBranch 分支
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=ssh://****
branch.mainBranch.remote=origin
branch.mainBranch.merge=refs/heads/main
reviewboard.url=https:**
tracking.branch=origin/mainBranch
从dev 分支发出的命令对mainBranch 进行代码审查:
post-review --parent mainBranch
错误:
> git merge-base origin/master refs/heads/dev Failed to execute command:
['git', 'merge-base', 'origin/master', 'refs/heads/dev']
> fatal: Not a valid object name origin/master
上述错误清楚地表明它正在尝试针对我的 git 存储库中不存在的主分支发布评论。但我有 mainBranch 。我需要指向 mainBranch 以便命令起作用。我不确定在 git config 或 rbtools config 中在哪里更改它? 请推荐
仅供参考 - RBT 工具:https://www.reviewboard.org/docs/rbtools/dev/
【问题讨论】: