2014-03-12 15 views
0

我想发布一个承诺,我已经做了,并推动之前必须rebase,现在我的分支是最新的,但当我做git审查它问一个问题:Gerrit推动审查答案更改...关闭

[user]$ git review *originbranch* 

**You are about to submit multiple commits. This is expected if you are 
submitting a commit that is dependent on one or more in-review 
commits. Otherwise you should consider squashing your changes into one 
commit before submitting.** 

The outstanding commits are: 

c7d455d A 
372b1b9 B 
27dea57 C 
1e600e2 D 
713422e E 
c84bea9 H 
7e2b81a I 

当我说是的结果是:

remote: Resolving deltas: 100% (223/223) 
remote: Processing changes: refs: 1, done  
To ssh://gerrit.hq.md.checkpoint.com:29418/ipssvc 
! [remote rejected] HEAD -> refs/publish/*originbranch*/CHANGE **(change 1298 closed)** 
error: failed to push some refs to 'ssh://URL' 

变化1298指的是改变d,它实际上是关闭的,但是是重订基期的一部分,

帮助?

回答

1

您没有正确重新绑定。因此,git review正尝试上传比您的更多提交。

您想要上传多少个提交以供审核?假设只有一个(A c7d455d),而你在主分支工作:

git fetch 
git checkout origin/master 
git cherry-pick c7d455d 

然后,您应该能够像正常上传。

如果您有多个提交上传,您可以按顺序挑选它们或使用git rebase