Client
Client commands and hooks can be downloaded via scp, wget or curl from Gerrit’s daemon, and then executed on the client system.
To download a client command or hook, use scp or an http client:
$ scp -p -P 29418 john.doe@review.example.com:bin/gerrit-cherry-pick ~/bin/ $ scp -p -P 29418 john.doe@review.example.com:hooks/commit-msg .git/hooks/
$ curl http://review.example.com/tools/bin/gerrit-cherry-pick $ curl http://review.example.com/tools/hooks/commit-msg
For more details on how to determine the correct SSH port number, see Testing Your SSH Connection.
Commands
- gerrit-cherry-pick
-
Download and cherry-pick one or more changes (commits).
Hooks
Client hooks can be installed into a local Git repository, improving the developer experience when working with a Gerrit Code Review server.
- commit-msg
-
Automatically generate `Change-Id: ` tags in commit messages.
Server
Aside from the standard Git server side actions, Gerrit supports several other commands over its internal SSH daemon. As Gerrit does not provide an interactive shell, the commands must be triggered from an ssh client, for example:
$ ssh -p 29418 review.example.com gerrit ls-projects
For more details on how to determine the correct SSH port number, see Testing Your SSH Connection.
User Commands
- git upload-pack
-
Standard Git server side command for client side git fetch.
- git receive-pack
-
Standard Git server side command for client side git push.
Also implements the magic associated with uploading commits for review. See Creating Changes.
- gerrit approve
-
Alias for gerrit review.
- gerrit ls-projects
-
List projects visible to the caller.
- gerrit query
-
Query the change database.
- gerrit review
-
Verify, approve and/or submit a patch set from the command line.
- gerrit stream-events
-
Monitor events occuring in real time.
- gerrit receive-pack
-
Legacy alias for git receive-pack.
Adminstrator Commands
- gerrit create-account
-
Create a new batch/role account.
- gerrit create-group
-
Create a new account group.
- gerrit create-project
-
Create a new project and associated Git repository.
- gerrit flush-caches
-
Flush some/all server caches from memory.
- gerrit gsql
-
Administrative interface to active database.
- gerrit set-project-parent
-
Change the project permissions are inherited from.
- gerrit show-caches
-
Display current cache statistics.
- gerrit show-connections
-
Display active client SSH connections.
- gerrit show-queue
-
Display the background work queues, including replication.
- gerrit replicate
-
Manually trigger replication, to recover a node.
- kill
-
Kills a scheduled or running task.
- ps
-
Alias for gerrit show-queue.
- suexec
-
Execute a command as any registered user account.
Part of Gerrit Code Review