如何解决Gerrit批准的审阅中的合并冲突? [英] How to solve merge conflict in a approved review in gerrit?

查看:599
本文介绍了如何解决Gerrit批准的审阅中的合并冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Gerrit进行了更改,该更改已通过代码审查,并在经过7次修订后获得批准.但是,现在无法合并,并且由于合并冲突,试图在gerrit网站中重新建立基础无法正常工作.如何解决此合并冲突并合并相同的已批准更改,而不创建新的更改. (从克隆存储库开始的完整步骤将不胜感激.)

I made a change in gerrit which was code reviewed and after 7 revisions approved. But, now it cannot be merged and trying to rebase in gerrit website is not working due to merge conflict. How can I resolve this merge conflict and merge the same approved change and not create a new one. (Full steps from cloning the repo would be appreciated.)

推荐答案

1)克隆Gerrit存储库

1) Clone the Gerrit repository

git clone https://USER@GERRIT-SERVER/a/REPO-FULL-PATHNAME

2)转到Gerrit上的更改页面,并复制checkout patch命令

2) Go to the change page on Gerrit and copy the checkout patch command

git fetch https://USER@GERRIT-SERVER/a/REPO-FULL-PATHNAME refs/changes/XX/YYYYY/Z && git checkout FETCH_HEAD

3)重新设置更改

git rebase origin/BRANCH

4)解决冲突

git mergetool

5)继续进行变基

git rebase --continue

重复步骤4和5,直到冲突结束

Repeat the steps 4 and 5 until the end of conflicts

git commit --amend

注意:保留相同的更改ID

Note: Keep the same Change-Id

6)将新补丁集发送给Gerrit

6) Send the new patchset to Gerrit

git push origin HEAD:refs/for/BRANCH

这篇关于如何解决Gerrit批准的审阅中的合并冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆