Gerrit/Alternatives to git-review/en

If installing git-review is not feasible for you, you can use plain Git as well. This can sometimes be a better option if git-review doesn't suit your workflow.

Set up
Download the commit-msg hook script from tools/hooks/commit-msg and save it in the  subdirectory of your cloned copy of the repository. There's three ways to do it:

Using curl
Mark the file as as "executable". In Linux you can change this with:

Using wget
Mark the file as as "executable". In Linux you can change this with:

Using the web browser
Select "Save as..." from the context menu when right-clicking on this link: tools/hooks/commit-msg

Save it to

Commit
Whenever you commit a change locally, the hook script will automatically add a unique "Change-Id" to the commit message.

Push for review
Add to following Git alias to simplify the command to push changes to Gerrit for review. You can do this by executing the following:

If you have a single 'origin' remote, then in the above command replace 'gerrit' with 'origin':

The  part is a virtual branch prefix used by Gerrit. However, you may replace "master" with another remote branch that you want to commit to. E.g.: When trying to push to the remote branch  use.

Push a commit to Gerrit with:

If you want to group a few related changesets (when working on a feature, or just to make them searchable in Gerrit), you can push them under the same topic using, for example: