Last Updated: February 25, 2016
·
919
· csquirrel

Smooth push to Gerrit

Gerrit (http://code.google.com/p/gerrit/) won't allow you to push directly to master branch. Instead you have to push to a 'review' branch.

Typically you're told to indicate 'review' branch on every push, e.g.

$> git push origin refs/for/review

You can make your life easier by setting up push branch in config/.git file:

$> vi .git
...
[remote "origin"]
...
    push = HEAD:refs/for/review
...

Note: The examples above assumes your remote repository is nicknamed 'origin'.