Using Gerrit, it is easy to accidentally merge unstable code from a development branch into a stable branch:
$ git checkout develop
$ commit
$ git push origin HEAD:refs/for/stable
At Gerrit, itβs not very clear that the proposed change comes from the development branch and should be merged into a stable branch. Is there a way to prevent this merging, either in git or in Gerrit?
Update:
At the moment, we are using a custom command to click on gerrit, which finds the last branch at the beginning on which it was based, and only allow clicking on this branch.
source
share