I am trying to publish a commit i've made and had to rebase before pushing, now my branch is up-to-date but when I do git review it ask a question:
[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
When i say yes the outcome is:
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 is referring to change D, and it actually is closed but was part of the rebasing,
help?
You didn't rebase correctly. Because of that, git review
is trying to upload several more commits than just yours.
How many commits are you trying to upload for review? Assuming just one (A c7d455d), and you are working on the master branch:
git fetch
git checkout origin/master
git cherry-pick c7d455d
You then should be able to upload like normal.
If you have multiple commits to upload, you can cherry-pick them in order or use git rebase