Git / gerrit prevents branch development for merging into a stable testing branch

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.

+5
source share
3 answers

, ​​.

, , , :

  • , .
  • " " (howto ) , " " +1, 0 " ", -1 " ", ,
  • (Jenkins )

, , gerrit, ?

+1

:

  • - , , "" , ""
  • - , "main", .

'git' "Integrator group" ( ).

: Gerrit/ Git /, , "git" , (IMHO ).

0

You need to configure certain Gerrit access controls for your "evolving" branch of this repo.

Setting as follows:

Reference: refs/for/refs/heads/develop
Push: Allow: <group>

But not :

Reference: refs/for/refs/heads/*
Push: Allow: <group>

Thus, yours <group>can only click to view "refs / for / develop" and not "refs / for / stable" or any other branch.

0
source

All Articles