Gerrit/Alternatives to git-review/de

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.



Einrichtung
Download the commit-msg hook script from tools/hooks/commit-msg and save it in the  subdirectory of your cloned copy of the repository. Es gibt drei Wege, dies zu machen:



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



Mit 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:



Siehe auch

 * Documentation/user-upload.html