How to merge the Gerrit branch to another Gerrit branch

This situation has been reported as a bug in Gerrit. Here’s a solution/workaround from Gerrit’s issue tracker:

To the best of my knowledge, you have 2 options currently –

  1. Force push to refs/heads. It is just a fast-forward, so in theory everything has already been reviewed and verified. There is no point in doing so again, so just skip that process and push to refs/heads rather than refs/for.

  2. Go ahead and create a merge commit. Use ‘git merge –no-ff’ – this will create a merge commit even though it isn’t necessary in your fast-forward situation. Then the merge commit can be uploaded, reviewed, verified, and merged like normal.

My company tends to go with option 2. I’ll close this as wontfix, but if you have any suggestions on how to do this better please let us know.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)