How to bypass Gerrit

Bypassing Gerrit

Say you have a bunch of changes and want to skip Gerrit’s interface entirely, pushing directly to the repository. For this you will need special privileges.

This is a summary of the user-upload feature, described in detail here.

Preparation

Start by syncing the repo:

repo sync

Branch the repository to anything. In the new branch, add your commits (or merge from another branch, git pull from AOSP, or whatever gets your changes in). Next, enter lineageremote. This command will add the remote (use git remote -v to see it).

To bypass Gerrit

Assuming lineage-20.0 is the branch to which you are pushing, type:

git push lineage HEAD:refs/heads/lineage-20.0

To mass-push commits to Gerrit for review

Type the above mentioned command, but use refs/for/branch instead of refs/heads/branch.

To create a new remote branch (on GitHub)

You can create a new (remote) branch by typing:

git push -u lineage HEAD:refs/heads/new-branch-name