Git Gerrit推动审查答案更改..关闭
我正试图发布我所做的承诺,在推之前必须重新设置基础,现在我的分支是最新的,但当我进行git审查时,会问一个问题:Git Gerrit推动审查答案更改..关闭,git,push,rebase,gerrit,git-review,Git,Push,Rebase,Gerrit,Git Review,我正试图发布我所做的承诺,在推之前必须重新设置基础,现在我的分支是最新的,但当我进行git审查时,会问一个问题: [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
[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'
change 1298指的是change D,它实际上是关闭的,但它是重新定基的一部分
帮助?您没有正确重新设置基础。正因为如此,
git review
正试图上传多个提交,而不仅仅是您的提交
您尝试上载多少次提交以供审阅?假设只有一个(c7d455d),您正在处理主分支:
git fetch
git checkout origin/master
git cherry-pick c7d455d
然后你应该能够像正常一样上传
如果要上传多个提交,可以按顺序选择它们或使用git rebase