哪些步骤会重现问题?
选择一个分支并在gerrit网页中删除它。
预期产量是多少?
在gerrit网页中成功删除分支,并删除了gitlab中的分支。
你看到了什么?
未在gitlab中删除。
其他信息:
答案 0 :(得分:0)
您似乎将Gerrit分支(远程)与您的分支(本地)混淆。当您在UI中删除Gerrit分支时,您将删除远程分支,这与您的本地分支无关。
转到本地存储库并执行" git branch -a"命令。假设您得到以下内容:
git branch -a
* master
feature1
feature2
remotes/origin/master
remotes/origin/feature1
这意味着Gerrit有2个分支(feature1和master),你有3个本地分支(master,feature1和feature2)。例如,如果删除" feature1"在Gerrit UI上分支,你不会看到"遥控器/ origin / feature1"在您执行命令" git fetch"之后,在您的本地存储库上,但您将继续看到分支" feature1"。它是一个本地分支机构。要删除它,您需要执行" git branch -D feature1"本地。
答案 1 :(得分:0)
当我在gerrit网页中添加分支时,复制日志为:
[2018-05-28 19:29:54,076] [] scheduling replication gerrit_test_only:refs/heads/release/v0.0.1 => git@192.168.0.224:fund-wuhan/gerrit_test_only.git
[2018-05-28 19:29:54,077] [] scheduled gerrit_test_only:refs/heads/release/v0.0.1 => [96bab7ae] push git@192.168.0.224:fund-wuhan/gerrit_test_only.git to run after 15s
[2018-05-28 19:30:09,077] [96bab7ae] Replication to git@192.168.0.224:fund-wuhan/gerrit_test_only.git started...
[2018-05-28 19:30:09,079] [96bab7ae] Push to git@192.168.0.224:fund-wuhan/gerrit_test_only.git references: [RemoteRefUpdate[remoteName=refs/heads/release/v0.0.1, NOT_ATTEMPTED, (null)...ecf1c112a9596a6d4a9054fc26dd2158ce8a9762, srcRef=refs/heads/release/v0.0.1, forceUpdate, message=null]]
[2018-05-28 19:30:09,697] [96bab7ae] Replication to git@192.168.0.224:fund-wuhan/gerrit_test_only.git completed in 610ms, 15000ms delay, 0 retries
当我删除gerrit网页中的分支时,复制日志为:
[2018-05-28 19:30:31,370] [] scheduling replication gerrit_test_only:refs/heads/release/v0.0.1 => git@192.168.0.224:fund-wuhan/gerrit_test_only.git
[2018-05-28 19:30:31,370] [] scheduled gerrit_test_only:refs/heads/release/v0.0.1 => [1679e7ee] push git@192.168.0.224:fund-wuhan/gerrit_test_only.git to run after 15s
[2018-05-28 19:30:46,370] [1679e7ee] Replication to git@192.168.0.224:fund-wuhan/gerrit_test_only.git started...
[2018-05-28 19:30:46,373] [1679e7ee] Replication to git@192.168.0.224:fund-wuhan/gerrit_test_only.git completed in 2ms, 15000ms delay, 0 retries
你可以发现没有
"推送至git@192.168.0.224:fund-wuhan / gerrit_test_only.git参考:[RemoteRefUpdate [remoteName = refs / heads / release / v0.0.1,NOT_ATTEMPTED,(null)... ecf1c112a9596a6d4a9054fc26dd2158ce8a9762,srcRef = refs / heads / release / v0.0.1,forceUpdate,message = null]]"
当我删除分支时。我认为这就是原因。
答案 2 :(得分:0)
remote.NAME.mirror 如果为true,则复制将删除本地不存在或复制不可见的远程分支(例如,通过authGroup选项拒绝读取访问)。
默认情况下,false,不要删除远程分支。
将“mirror = true”添加到replication.config即可。