Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - Command Line Tools |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == Client |
Shawn O. Pearce | 1f8d0a2 | 2009-06-15 18:31:12 -0700 | [diff] [blame] | 4 | |
Shawn O. Pearce | 3e4e804 | 2010-01-29 12:48:21 -0800 | [diff] [blame] | 5 | Client commands and hooks can be downloaded via scp, wget or curl |
| 6 | from Gerrit's daemon, and then executed on the client system. |
Shawn O. Pearce | b89e1de | 2009-08-22 13:31:11 -0700 | [diff] [blame] | 7 | |
Shawn O. Pearce | 3e4e804 | 2010-01-29 12:48:21 -0800 | [diff] [blame] | 8 | To download a client command or hook, use scp or an http client: |
Shawn O. Pearce | b89e1de | 2009-08-22 13:31:11 -0700 | [diff] [blame] | 9 | |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 10 | ---- |
Edwin Kempin | f178f27 | 2011-02-28 08:43:56 +0100 | [diff] [blame] | 11 | $ 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. Pearce | b89e1de | 2009-08-22 13:31:11 -0700 | [diff] [blame] | 13 | |
Dave Borowitz | 572d599 | 2013-05-10 16:17:10 +0100 | [diff] [blame] | 14 | $ 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 Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 16 | ---- |
Shawn O. Pearce | 3e4e804 | 2010-01-29 12:48:21 -0800 | [diff] [blame] | 17 | |
Shawn O. Pearce | b89e1de | 2009-08-22 13:31:11 -0700 | [diff] [blame] | 18 | For more details on how to determine the correct SSH port number, |
| 19 | see link:user-upload.html#test_ssh[Testing Your SSH Connection]. |
| 20 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 21 | === [[client_commands]]Commands |
Shawn O. Pearce | 1f8d0a2 | 2009-06-15 18:31:12 -0700 | [diff] [blame] | 22 | |
| 23 | link:cmd-cherry-pick.html[gerrit-cherry-pick]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 24 | Download and cherry-pick one or more changes (commits). |
Shawn O. Pearce | 1f8d0a2 | 2009-06-15 18:31:12 -0700 | [diff] [blame] | 25 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 26 | === [[client_hooks]]Hooks |
Shawn O. Pearce | 1f8d0a2 | 2009-06-15 18:31:12 -0700 | [diff] [blame] | 27 | |
Shawn O. Pearce | b89e1de | 2009-08-22 13:31:11 -0700 | [diff] [blame] | 28 | Client hooks can be installed into a local Git repository, improving |
| 29 | the developer experience when working with a Gerrit Code Review |
| 30 | server. |
Shawn O. Pearce | bb2b567 | 2009-08-21 18:33:10 -0700 | [diff] [blame] | 31 | |
| 32 | link:cmd-hook-commit-msg.html[commit-msg]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 33 | Automatically generate `Change-Id: ` tags in commit messages. |
Shawn O. Pearce | bb2b567 | 2009-08-21 18:33:10 -0700 | [diff] [blame] | 34 | |
Shawn O. Pearce | bb2b567 | 2009-08-21 18:33:10 -0700 | [diff] [blame] | 35 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 36 | == Server |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 37 | |
| 38 | Aside from the standard Git server side actions, Gerrit supports |
| 39 | several other commands over its internal SSH daemon. As Gerrit does |
| 40 | not provide an interactive shell, the commands must be triggered |
| 41 | from an ssh client, for example: |
| 42 | |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 43 | ---- |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 44 | $ ssh -p 29418 review.example.com gerrit ls-projects |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 45 | ---- |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 46 | |
| 47 | For more details on how to determine the correct SSH port number, |
| 48 | see link:user-upload.html#test_ssh[Testing Your SSH Connection]. |
| 49 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 50 | === [[user_commands]]User Commands |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 51 | |
David Ostrovsky | 1f04bca | 2013-10-19 10:38:50 +0200 | [diff] [blame] | 52 | link:cmd-apropos.html[gerrit apropos]:: |
| 53 | Search Gerrit documentation index. |
| 54 | |
Edwin Kempin | f485a0d | 2012-03-30 08:11:47 +0200 | [diff] [blame] | 55 | link:cmd-ban-commit.html[gerrit ban-commit]:: |
| 56 | Bans a commit from a project's repository. |
| 57 | |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 58 | link:cmd-create-branch.html[gerrit create-branch]:: |
| 59 | Create a new project branch. |
| 60 | |
Edwin Kempin | cf6c359 | 2011-09-01 15:55:15 +0200 | [diff] [blame] | 61 | link:cmd-ls-groups.html[gerrit ls-groups]:: |
| 62 | List groups visible to the caller. |
| 63 | |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 64 | link:cmd-ls-members.html[gerrit ls-members]:: |
| 65 | List the membership of a group visible to the caller. |
| 66 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 67 | link:cmd-ls-projects.html[gerrit ls-projects]:: |
| 68 | List projects visible to the caller. |
| 69 | |
| 70 | link:cmd-query.html[gerrit query]:: |
| 71 | Query the change database. |
| 72 | |
| 73 | 'gerrit receive-pack':: |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 74 | 'Deprecated alias for `git receive-pack`.' |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 75 | |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 76 | link:cmd-rename-group.html[gerrit rename-group]:: |
| 77 | Rename an account group. |
| 78 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 79 | link:cmd-review.html[gerrit review]:: |
| 80 | Verify, approve and/or submit a patch set from the command line. |
| 81 | |
Dariusz Luksza | 5575021 | 2015-03-04 16:28:30 +0100 | [diff] [blame] | 82 | link:cmd-set-head.html[gerrit set-head]:: |
| 83 | Change the HEAD reference of a project. |
| 84 | |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 85 | link:cmd-set-reviewers.html[gerrit set-reviewers]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 86 | Add or remove reviewers on a change. |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 87 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 88 | link:cmd-stream-events.html[gerrit stream-events]:: |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 89 | Monitor events occurring in real time. |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 90 | |
Magnus Bäck | f9b41a4 | 2012-09-25 12:20:39 -0400 | [diff] [blame] | 91 | link:cmd-version.html[gerrit version]:: |
| 92 | Show the currently executing version of Gerrit. |
| 93 | |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 94 | link:cmd-receive-pack.html[git receive-pack]:: |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 95 | Standard Git server side command for client side `git push`. |
| 96 | + |
| 97 | Also implements the magic associated with uploading commits for |
| 98 | review. See link:user-upload.html#push_create[Creating Changes]. |
| 99 | |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 100 | git upload-pack:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 101 | Standard Git server side command for client side `git fetch`. |
Mani Chandel | 7ec4ac7 | 2013-12-10 14:50:33 +0530 | [diff] [blame] | 102 | |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 103 | [[admin_commands]]Administrator Commands |
Shawn O. Pearce | b89e1de | 2009-08-22 13:31:11 -0700 | [diff] [blame] | 104 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 105 | |
Hugo Arès | 641fc78 | 2015-01-08 14:24:07 -0500 | [diff] [blame] | 106 | link:cmd-close-connection.html[gerrit close-connection]:: |
| 107 | Close the specified SSH connection. |
| 108 | |
Shawn O. Pearce | b2ff7c8 | 2010-03-20 16:57:36 -0700 | [diff] [blame] | 109 | link:cmd-create-account.html[gerrit create-account]:: |
David Pursehouse | c268399 | 2013-08-24 12:04:52 +0900 | [diff] [blame] | 110 | Create a new user account. |
Shawn O. Pearce | b2ff7c8 | 2010-03-20 16:57:36 -0700 | [diff] [blame] | 111 | |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 112 | link:cmd-create-group.html[gerrit create-group]:: |
| 113 | Create a new account group. |
| 114 | |
Shawn O. Pearce | 6e75221 | 2009-08-12 12:22:12 -0700 | [diff] [blame] | 115 | link:cmd-create-project.html[gerrit create-project]:: |
| 116 | Create a new project and associated Git repository. |
| 117 | |
Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 118 | link:cmd-flush-caches.html[gerrit flush-caches]:: |
| 119 | Flush some/all server caches from memory. |
| 120 | |
Edwin Kempin | 619169b | 2012-02-09 15:47:52 +0100 | [diff] [blame] | 121 | link:cmd-gc.html[gerrit gc]:: |
| 122 | Run the Git garbage collection. |
| 123 | |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 124 | link:cmd-gsql.html[gerrit gsql]:: |
| 125 | Administrative interface to active database. |
| 126 | |
Khai Do | 71797a9 | 2016-02-25 14:06:21 -0800 | [diff] [blame] | 127 | link:cmd-index-activate.html[gerrit index activate]:: |
Hugo Arès | 47f15be | 2015-06-30 10:36:08 -0400 | [diff] [blame] | 128 | Activate the latest index version available. |
| 129 | |
Hugo Arès | 3a59335 | 2015-06-29 16:04:59 -0400 | [diff] [blame] | 130 | link:cmd-index-start.html[gerrit index start]:: |
| 131 | Start the online indexer. |
| 132 | |
David Pursehouse | 3f99e4e | 2016-05-20 15:37:18 +0900 | [diff] [blame] | 133 | link:cmd-index-changes.html[gerrit index changes]:: |
| 134 | Index one or more changes. |
| 135 | |
Simon Lei | c331a4e | 2014-08-08 11:12:38 -0400 | [diff] [blame] | 136 | link:cmd-logging-ls-level.html[gerrit logging ls-level]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 137 | List loggers and their logging level. |
Simon Lei | c331a4e | 2014-08-08 11:12:38 -0400 | [diff] [blame] | 138 | |
| 139 | link:cmd-logging-set-level.html[gerrit logging set-level]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 140 | Set the logging level of loggers. |
Simon Lei | c331a4e | 2014-08-08 11:12:38 -0400 | [diff] [blame] | 141 | |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 142 | link:cmd-ls-user-refs.html[gerrit ls-user-refs]:: |
| 143 | Lists refs visible for a specified user. |
| 144 | |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 145 | link:cmd-plugin-install.html[gerrit plugin add]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 146 | Alias for 'gerrit plugin install'. |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 147 | |
Brad Larson | d5e87c3 | 2012-07-11 12:18:49 -0500 | [diff] [blame] | 148 | link:cmd-plugin-enable.html[gerrit plugin enable]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 149 | Enable plugins. |
Brad Larson | d5e87c3 | 2012-07-11 12:18:49 -0500 | [diff] [blame] | 150 | |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 151 | link:cmd-plugin-install.html[gerrit plugin install]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 152 | Install/Add a plugin. |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 153 | |
| 154 | link:cmd-plugin-ls.html[gerrit plugin ls]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 155 | List the installed plugins. |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 156 | |
| 157 | link:cmd-plugin-reload.html[gerrit plugin reload]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 158 | Reload/Restart plugins. |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 159 | |
| 160 | link:cmd-plugin-remove.html[gerrit plugin remove]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 161 | Disable plugins. |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 162 | |
| 163 | link:cmd-plugin-remove.html[gerrit plugin rm]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 164 | Alias for 'gerrit plugin remove'. |
Edwin Kempin | f729574 | 2012-07-16 15:03:46 +0200 | [diff] [blame] | 165 | |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 166 | link:cmd-set-account.html[gerrit set-account]:: |
| 167 | Change an account's settings. |
| 168 | |
| 169 | link:cmd-set-members.html[gerrit set-members]:: |
| 170 | Set group members. |
| 171 | |
| 172 | link:cmd-set-project.html[gerrit set-project]:: |
David Pursehouse | 4fd8643 | 2015-01-09 10:43:58 +0900 | [diff] [blame] | 173 | Change a project's settings. |
Hugo Arès | 169cb23 | 2015-01-08 15:40:06 -0500 | [diff] [blame] | 174 | |
| 175 | link:cmd-set-project-parent.html[gerrit set-project-parent]:: |
| 176 | Change the project permissions are inherited from. |
| 177 | |
| 178 | link:cmd-show-caches.html[gerrit show-caches]:: |
| 179 | Display current cache statistics. |
| 180 | |
| 181 | link:cmd-show-connections.html[gerrit show-connections]:: |
| 182 | Display active client SSH connections. |
| 183 | |
| 184 | link:cmd-show-queue.html[gerrit show-queue]:: |
| 185 | Display the background work queues, including replication. |
| 186 | |
Edwin Kempin | 55210d4 | 2013-03-26 10:30:26 +0100 | [diff] [blame] | 187 | link:cmd-test-submit-rule.html[gerrit test-submit rule]:: |
Johan Björk | 20ae069 | 2012-08-02 15:57:13 +0200 | [diff] [blame] | 188 | Test prolog submit rules. |
| 189 | |
Edwin Kempin | 48a9e0d | 2013-03-26 10:41:46 +0100 | [diff] [blame] | 190 | link:cmd-test-submit-type.html[gerrit test-submit type]:: |
| 191 | Test prolog submit type. |
| 192 | |
Shawn O. Pearce | 3f1a13a | 2009-11-20 20:15:41 -0800 | [diff] [blame] | 193 | link:cmd-kill.html[kill]:: |
| 194 | Kills a scheduled or running task. |
| 195 | |
| 196 | link:cmd-show-queue.html[ps]:: |
| 197 | Alias for 'gerrit show-queue'. |
| 198 | |
Nasser Grainawi | 21f8fb4 | 2010-04-14 16:55:18 -0600 | [diff] [blame] | 199 | link:cmd-suexec.html[suexec]:: |
| 200 | Execute a command as any registered user account. |
| 201 | |
Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 202 | GERRIT |
| 203 | ------ |
| 204 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 205 | |
| 206 | SEARCHBOX |
| 207 | --------- |