Openstack: Gerrit error with git rebase and merge
<p>I am working on fixing a bug in Openstack. I did my changes, since this was a documentation task, I did run the test as I would have usually. I submitted  the change to Gerrit. It came back from the reviewers while I was working on a another bug. </p>

<p>I switched branches and worked on the older bug. When I did a <code>git review</code>, it threw up the following error. </p>

<pre><code> You are about to submit multiple commits. This is expected if you are
</code></pre>

<p>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.</p>

<pre><code> The outstanding commits are:

 cd6bbfa (HEAD -&gt; master) Documentation updated on panel definition using plugin files
 5503c89 Merge branch 'master' of git://git.openstack.org/openstack/horizon
 85b63be Change-ID:Ic0844d967d519f57246b8220f9a863faf85351d2 Closes-Bug:#1519386
 74cc524 Merge branch 'master' of git://git.openstack.org/openstack/horizon
 377fb7e Closes-Bug: #1597302

 Do you really want to submit the above commits?
 Type 'yes' to confirm, other to cancel: 
</code></pre>

<p>I thought I had to do yes, and I did yes. Then Gerrit threw this error again.</p>

<pre><code>remote: Processing changes: refs: 1, done           
To ssh://annakoppad@review.openstack.org:29418/openstack/horizon.git
 ! [remote rejected] HEAD -&gt; refs/publish/master/bug/1597302 (you are not allowed to upload merges)
error: failed to push some refs to 'ssh://annakoppad@review.openstack.org:29418/openstack/horizon.git'
</code></pre>

<p>I tried to fix it by doing a rebase.</p>

<pre><code>$ git rebase -i 377fb7e

The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

git commit --allow-empty

 Otherwise, please use 'git reset' interactive rebase in progress; onto 377fb7e
Last commands done (190 commands done):
pick 15909be modify the home-page info with the developer documentation
pick 5a39ad7 Update the home-page in setup.cfg
   Next commands to do (137 remaining commands):
pick 21b723e Fix typo
pick 41e9d62 Remove embedded CSS
You are currently rebasing branch 'master' on '377fb7e'.

 nothing to commit, working directory clean
 Could not apply 5a39ad78233546a01ae3da6efd10b104231d1d8b... Update the home-page in setup.cfg
</code></pre>

<p>This is what I am trying to achieve. I want to change back to my old bug <code>1597302</code> and submit it to review and continue working on my current bug which is <code>1519386</code></p>

<p>Thanks for anyone who can help me with this.!</p>

<p>The error "you are not allowed to upload merges" is self explanatory: you can't upload your code because you don't have permission to push merge commits. Gerrit is referring to commits 5503c89 and/or 74cc524.</p>

<p>The first thing you need to do is to verify if you should be pushing these commits to Gerrit or there's something wrong with your repository. Did you create these commits or were they created by someone else? Are you basing in the correct commit? Are you following the OpenStack develop process (I don't know it)?</p>

<p>If you really need to push these merge commit to Gerrit then (maybe) you need to ask the admin for permission to push merge commits.</p>

python git openstack gerrit openstack-horizon