赞
踩
在进行gerrit 提交时,发生:same Change-Id in multiple changes
这种情况常常是,coder 发现第一次commit 有了问题,然后在本地解决好这个问题之后,进行 第二次的commit,然后,在cmmit msg 里写上 相同的changId(在最后一个段落)
然后无法push 到gerrit 的远程分支(比如 refs/for/your_branch)
gerrit 拒绝这个提交的原因是,如果两个commit 是相同的changeId, 那么gerrit 为了review 的简单,
会禁止两次commit,因为你的commit 2 必然依赖 commit 1. 而且gerrit 一直推崇 commit --amend 这种方式。
https://gerrit-review.googlesource.com/Documentation/error-same-change-id-in-multiple-changes.html
how to solve:
git rebase -i HEAD~2 pick ca45e12 one commit squash 13d3812 another commit [detached HEAD ab37207] squashed commit 1 files changed, 3 insertions(+), 0 deletions(-) Successfully rebased and updated refs/heads/master. $ git log commit ab37207d33647685801dba36cb4fd51f3eb73507 Author: John Doe <john.doe@example.com> Date: Thu Dec 16 10:12:54 2010 +0100 squashed commit Change-Id: I93478acac09965af91f03c82e55346214811ac79 $ git push ssh://JohnDoe@host:29418/myProject HEAD:refs/for/master Counting objects: 5, done. Writing objects: 100% (3/3), 307 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To ssh://JohnDoe@host:29418/myProject * [new branch] HEAD -> refs/for/master
但是执行了这个,发生: duplicate request
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。