Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gerrit: Is there a way to push directly into master?

Tags:

git

gerrit

I understand that Gerrit impose a code review process so that every changes has to get a verification plus a code review of score "+2"

My question: Is there a way to bypass these two requirements? We need to do this for debugging purposes

like image 655
leeyuiwah Avatar asked Nov 20 '25 09:11

leeyuiwah


1 Answers

You push changes to Gerrit executing the "git push" command like in the following example:

git push origin HEAD:refs/for/master

The "refs/for" is the "magical branch" which tells Gerrit that you want to send a change to review.

You can bypass Gerrit (and the review process) pushing straight to the branch if you execute the "git push" command like following:

git push origin HEAD:refs/heads/master

or simply:

git push origin HEAD:master

or considering that your local branch master tracks the remote branch master, just:

git push

But... to be able to push straight to the branch bypassing Gerrit you need to have Push = ALLOW permission for refs/heads/* reference.

Gerrit administrators can grant this permission to you. It's not mandatory but usually only users with "integrator" role have this permission set.

like image 97
Marcelo Ávila de Oliveira Avatar answered Nov 23 '25 00:11

Marcelo Ávila de Oliveira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!