gerrit review - Verify, approve and/or submit one or more patch sets


'ssh' -p <port> <host> 'gerrit review'
  [--project <PROJECT> | -p <PROJECT>]
  [--message <MESSAGE> | -m <MESSAGE>]
  [--submit | -s]
  [--abandon | --restore]
  [--verified <N>] [--code-review <N>]
  [--label Label-Name=<N>]


Updates the current user’s approval status of the specified patch sets and/or submits them for merging, sending out email notifications and updating the database.

Patch sets may be specified in CHANGEID,PATCHSET format, such as 8242,2, or COMMIT format.

If a patch set is specified with the COMMIT format, the complete or abbreviated commit SHA-1 may be used. If the same commit is available in multiple projects the --project option may be used to limit where Gerrit searches for the change to only the contents of the specified project.



Name of the project the intended changes are contained within. This option must be supplied before the commit SHA-1 in order to take effect.


Optional cover letter to include as part of the message sent to reviewers when the approval states are updated.


Display site-specific usage information, including the complete listing of supported approval categories and values.


Abandon the specified change(s). (option is mutually exclusive with --submit and --restore)


Restore the specified abandoned change(s). (option is mutually exclusive with --abandon)


Submit the specified patch set(s) for merging. (option is mutually exclusive with --abandon)


Publish the specified draft patch set(s). (option is mutually exclusive with --submit, --restore, --abandon, and --delete)


Delete the specified draft patch set(s). (option is mutually exclusive with --submit, --restore, --abandon, and --publish)


Set the label to the value N. The exact option names supported and the range of values permitted differs per site, check the output of --help, or contact your site administrator for further details. These options are only available for these built-in labels; for other labels, see --label.


Set a label by name to the value N.


Any user who has configured an SSH key.


This command is intended to be used in scripts.


Approve the change with commit c0ff33 as "Verified +1"

$ ssh -p 29418 gerrit review --verified +1 c0ff33

Append the message "Build Successful". Notice two levels of quoting is required, one for the local shell, and another for the argument parser inside the Gerrit server:

$ ssh -p 29418 gerrit review -m '"Build Successful"' c0ff33

Mark the unmerged commits both "Verified +1" and "Code-Review +2" and submit them for merging:

$ ssh -p 29418 gerrit review \
  --verified +1 \
  --code-review +2 \
  --submit \
  --project this/project \
  $(git rev-list origin/master..HEAD)

Abandon an active change:

$ ssh -p 29418 gerrit review --abandon c0ff33