blob: 61e78650deae73784a094a754b96d4fa75b9ffc3 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - Command Line Tools
Shawn O. Pearce4016a932009-05-28 15:12:40 -07002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== Client
Shawn O. Pearce1f8d0a22009-06-15 18:31:12 -07004
Shawn O. Pearce3e4e8042010-01-29 12:48:21 -08005Client commands and hooks can be downloaded via scp, wget or curl
6from Gerrit's daemon, and then executed on the client system.
Shawn O. Pearceb89e1de2009-08-22 13:31:11 -07007
Shawn O. Pearce3e4e8042010-01-29 12:48:21 -08008To download a client command or hook, use scp or an http client:
Shawn O. Pearceb89e1de2009-08-22 13:31:11 -07009
Michael Ochmannb99feab2016-07-06 14:10:22 +020010----
Edwin Kempinf178f272011-02-28 08:43:56 +010011 $ scp -p -P 29418 john.doe@review.example.com:bin/gerrit-cherry-pick ~/bin/
12 $ scp -p -P 29418 john.doe@review.example.com:hooks/commit-msg .git/hooks/
Shawn O. Pearceb89e1de2009-08-22 13:31:11 -070013
Dave Borowitz572d5992013-05-10 16:17:10 +010014 $ curl -Lo ~/bin/gerrit-cherry-pick http://review.example.com/tools/bin/gerrit-cherry-pick
15 $ curl -Lo .git/hooks/commit-msg http://review.example.com/tools/hooks/commit-msg
Michael Ochmannb99feab2016-07-06 14:10:22 +020016----
Shawn O. Pearce3e4e8042010-01-29 12:48:21 -080017
Shawn O. Pearceb89e1de2009-08-22 13:31:11 -070018For more details on how to determine the correct SSH port number,
19see link:user-upload.html#test_ssh[Testing Your SSH Connection].
20
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080021=== [[client_commands]]Commands
Shawn O. Pearce1f8d0a22009-06-15 18:31:12 -070022
23link:cmd-cherry-pick.html[gerrit-cherry-pick]::
David Pursehouse4fd86432015-01-09 10:43:58 +090024 Download and cherry-pick one or more changes (commits).
Shawn O. Pearce1f8d0a22009-06-15 18:31:12 -070025
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080026=== [[client_hooks]]Hooks
Shawn O. Pearce1f8d0a22009-06-15 18:31:12 -070027
Shawn O. Pearceb89e1de2009-08-22 13:31:11 -070028Client hooks can be installed into a local Git repository, improving
29the developer experience when working with a Gerrit Code Review
30server.
Shawn O. Pearcebb2b5672009-08-21 18:33:10 -070031
32link:cmd-hook-commit-msg.html[commit-msg]::
David Pursehouse4fd86432015-01-09 10:43:58 +090033 Automatically generate `Change-Id: ` tags in commit messages.
Shawn O. Pearcebb2b5672009-08-21 18:33:10 -070034
Shawn O. Pearcebb2b5672009-08-21 18:33:10 -070035
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080036== Server
Shawn O. Pearce4016a932009-05-28 15:12:40 -070037
38Aside from the standard Git server side actions, Gerrit supports
39several other commands over its internal SSH daemon. As Gerrit does
40not provide an interactive shell, the commands must be triggered
41from an ssh client, for example:
42
Michael Ochmannb99feab2016-07-06 14:10:22 +020043----
Shawn O. Pearce4016a932009-05-28 15:12:40 -070044 $ ssh -p 29418 review.example.com gerrit ls-projects
Michael Ochmannb99feab2016-07-06 14:10:22 +020045----
Shawn O. Pearce4016a932009-05-28 15:12:40 -070046
47For more details on how to determine the correct SSH port number,
48see link:user-upload.html#test_ssh[Testing Your SSH Connection].
49
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080050=== [[user_commands]]User Commands
Shawn O. Pearce4016a932009-05-28 15:12:40 -070051
David Ostrovsky1f04bca2013-10-19 10:38:50 +020052link:cmd-apropos.html[gerrit apropos]::
53 Search Gerrit documentation index.
54
Edwin Kempinf485a0d2012-03-30 08:11:47 +020055link:cmd-ban-commit.html[gerrit ban-commit]::
56 Bans a commit from a project's repository.
57
Hugo Arès169cb232015-01-08 15:40:06 -050058link:cmd-create-branch.html[gerrit create-branch]::
59 Create a new project branch.
60
Edwin Kempincf6c3592011-09-01 15:55:15 +020061link:cmd-ls-groups.html[gerrit ls-groups]::
62 List groups visible to the caller.
63
James Ring8e342722013-05-01 01:40:53 -070064link:cmd-ls-members.html[gerrit ls-members]::
65 List the membership of a group visible to the caller.
66
Shawn O. Pearce47769242011-06-14 16:40:48 -070067link:cmd-ls-projects.html[gerrit ls-projects]::
68 List projects visible to the caller.
69
70link:cmd-query.html[gerrit query]::
71 Query the change database.
72
73'gerrit receive-pack'::
Edwin Kempinf1acbb82011-09-15 12:49:42 +020074 'Deprecated alias for `git receive-pack`.'
Shawn O. Pearce47769242011-06-14 16:40:48 -070075
Hugo Arès169cb232015-01-08 15:40:06 -050076link:cmd-rename-group.html[gerrit rename-group]::
77 Rename an account group.
78
Shawn O. Pearce47769242011-06-14 16:40:48 -070079link:cmd-review.html[gerrit review]::
80 Verify, approve and/or submit a patch set from the command line.
81
Dariusz Luksza55750212015-03-04 16:28:30 +010082link:cmd-set-head.html[gerrit set-head]::
83 Change the HEAD reference of a project.
84
Hugo Arès169cb232015-01-08 15:40:06 -050085link:cmd-set-reviewers.html[gerrit set-reviewers]::
David Pursehouse4fd86432015-01-09 10:43:58 +090086 Add or remove reviewers on a change.
Hugo Arès169cb232015-01-08 15:40:06 -050087
Shawn O. Pearce47769242011-06-14 16:40:48 -070088link:cmd-stream-events.html[gerrit stream-events]::
Edwin Kempinf1acbb82011-09-15 12:49:42 +020089 Monitor events occurring in real time.
Shawn O. Pearce47769242011-06-14 16:40:48 -070090
Magnus Bäckf9b41a42012-09-25 12:20:39 -040091link:cmd-version.html[gerrit version]::
92 Show the currently executing version of Gerrit.
93
Shawn O. Pearce93599bb2009-06-16 07:27:53 -070094link:cmd-receive-pack.html[git receive-pack]::
Shawn O. Pearce4016a932009-05-28 15:12:40 -070095 Standard Git server side command for client side `git push`.
96+
97Also implements the magic associated with uploading commits for
98review. See link:user-upload.html#push_create[Creating Changes].
99
Hugo Arès169cb232015-01-08 15:40:06 -0500100git upload-pack::
David Pursehouse4fd86432015-01-09 10:43:58 +0900101 Standard Git server side command for client side `git fetch`.
Mani Chandel7ec4ac72013-12-10 14:50:33 +0530102
Edwin Kempinf1acbb82011-09-15 12:49:42 +0200103[[admin_commands]]Administrator Commands
Shawn O. Pearceb89e1de2009-08-22 13:31:11 -0700104~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700105
Hugo Arès641fc782015-01-08 14:24:07 -0500106link:cmd-close-connection.html[gerrit close-connection]::
107 Close the specified SSH connection.
108
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -0700109link:cmd-create-account.html[gerrit create-account]::
David Pursehousec2683992013-08-24 12:04:52 +0900110 Create a new user account.
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -0700111
Sasa Zivkov71963a52010-07-30 15:13:58 +0200112link:cmd-create-group.html[gerrit create-group]::
113 Create a new account group.
114
Shawn O. Pearce6e752212009-08-12 12:22:12 -0700115link:cmd-create-project.html[gerrit create-project]::
116 Create a new project and associated Git repository.
117
Shawn O. Pearce4016a932009-05-28 15:12:40 -0700118link:cmd-flush-caches.html[gerrit flush-caches]::
119 Flush some/all server caches from memory.
120
Edwin Kempin619169b2012-02-09 15:47:52 +0100121link:cmd-gc.html[gerrit gc]::
122 Run the Git garbage collection.
123
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -0800124link:cmd-gsql.html[gerrit gsql]::
125 Administrative interface to active database.
126
Khai Do71797a92016-02-25 14:06:21 -0800127link:cmd-index-activate.html[gerrit index activate]::
Hugo Arès47f15be2015-06-30 10:36:08 -0400128 Activate the latest index version available.
129
Hugo Arès3a593352015-06-29 16:04:59 -0400130link:cmd-index-start.html[gerrit index start]::
131 Start the online indexer.
132
David Pursehouse3f99e4e2016-05-20 15:37:18 +0900133link:cmd-index-changes.html[gerrit index changes]::
134 Index one or more changes.
135
Simon Leic331a4e2014-08-08 11:12:38 -0400136link:cmd-logging-ls-level.html[gerrit logging ls-level]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900137 List loggers and their logging level.
Simon Leic331a4e2014-08-08 11:12:38 -0400138
139link:cmd-logging-set-level.html[gerrit logging set-level]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900140 Set the logging level of loggers.
Simon Leic331a4e2014-08-08 11:12:38 -0400141
Hugo Arès169cb232015-01-08 15:40:06 -0500142link:cmd-ls-user-refs.html[gerrit ls-user-refs]::
143 Lists refs visible for a specified user.
144
Edwin Kempinf7295742012-07-16 15:03:46 +0200145link:cmd-plugin-install.html[gerrit plugin add]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900146 Alias for 'gerrit plugin install'.
Edwin Kempinf7295742012-07-16 15:03:46 +0200147
Brad Larsond5e87c32012-07-11 12:18:49 -0500148link:cmd-plugin-enable.html[gerrit plugin enable]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900149 Enable plugins.
Brad Larsond5e87c32012-07-11 12:18:49 -0500150
Edwin Kempinf7295742012-07-16 15:03:46 +0200151link:cmd-plugin-install.html[gerrit plugin install]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900152 Install/Add a plugin.
Edwin Kempinf7295742012-07-16 15:03:46 +0200153
154link:cmd-plugin-ls.html[gerrit plugin ls]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900155 List the installed plugins.
Edwin Kempinf7295742012-07-16 15:03:46 +0200156
157link:cmd-plugin-reload.html[gerrit plugin reload]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900158 Reload/Restart plugins.
Edwin Kempinf7295742012-07-16 15:03:46 +0200159
160link:cmd-plugin-remove.html[gerrit plugin remove]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900161 Disable plugins.
Edwin Kempinf7295742012-07-16 15:03:46 +0200162
163link:cmd-plugin-remove.html[gerrit plugin rm]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900164 Alias for 'gerrit plugin remove'.
Edwin Kempinf7295742012-07-16 15:03:46 +0200165
Hugo Arès169cb232015-01-08 15:40:06 -0500166link:cmd-set-account.html[gerrit set-account]::
167 Change an account's settings.
168
169link:cmd-set-members.html[gerrit set-members]::
170 Set group members.
171
172link:cmd-set-project.html[gerrit set-project]::
David Pursehouse4fd86432015-01-09 10:43:58 +0900173 Change a project's settings.
Hugo Arès169cb232015-01-08 15:40:06 -0500174
175link:cmd-set-project-parent.html[gerrit set-project-parent]::
176 Change the project permissions are inherited from.
177
178link:cmd-show-caches.html[gerrit show-caches]::
179 Display current cache statistics.
180
181link:cmd-show-connections.html[gerrit show-connections]::
182 Display active client SSH connections.
183
184link:cmd-show-queue.html[gerrit show-queue]::
185 Display the background work queues, including replication.
186
Edwin Kempin55210d42013-03-26 10:30:26 +0100187link:cmd-test-submit-rule.html[gerrit test-submit rule]::
Johan Björk20ae0692012-08-02 15:57:13 +0200188 Test prolog submit rules.
189
Edwin Kempin48a9e0d2013-03-26 10:41:46 +0100190link:cmd-test-submit-type.html[gerrit test-submit type]::
191 Test prolog submit type.
192
Shawn O. Pearce3f1a13a2009-11-20 20:15:41 -0800193link:cmd-kill.html[kill]::
194 Kills a scheduled or running task.
195
196link:cmd-show-queue.html[ps]::
197 Alias for 'gerrit show-queue'.
198
Nasser Grainawi21f8fb42010-04-14 16:55:18 -0600199link:cmd-suexec.html[suexec]::
200 Execute a command as any registered user account.
201
Shawn O. Pearce5500e692009-05-28 15:55:01 -0700202GERRIT
203------
204Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700205
206SEARCHBOX
207---------