dev
|
|
|------------> what should I do to apply that fix and test changes in my commit?
|(commit4:bug fixed)
|------------> git pull, then i've pushed my commit on gerrit (not merged now)
|(commit3:with bug)
|(commit2)
|(commit1)
作为一种解决方案,我可以放弃我的提交,生成git pull
然后进行新的提交。但还有其他解决方案吗?
答案 0 :(得分:0)
每次放弃改变都不是一个好习惯。
您可以尝试以下组合(您认为):
将更改推送到gerrit并想要将代码更新为最新版本后,只需尝试
即可 git reset --hard HEAD~1
(如果仅按1更改或使用您的分支HEAD重置)。
做git pull
并最终使用gerrit更改链接到Cherry-选择相同的本地系统
git fetch ssh://gerrit-url/project refs/changes/*/*****/* && git cherry-pick FETCH_HEAD
尝试解决冲突,如果有的话,你就完成了。享受!!