Gerrit 简明教程
Gerrit - Overview
Gerrit 是一款基于 Web 的代码审查工具,与 Git 相集成,并建立在 Git 版本控制系统之上(帮助开发者协同工作并维护其工作记录)。当代码审查完成时,它允许将更改合并到 Git 仓库。
Gerrit is a web based code review tool which is integrated with Git and built on top of Git version control system (helps developers to work together and maintain the history of their work). It allows to merge changes to Git repository when you are done with the code reviews.
Gerrit 由 Google 的 Shawn Pearce 开发,它用 Java、Servlet 和 GWT(Google Web Toolkit)编写。Gerrit 的稳定版本是 2.12.2,于 2016 年 3 月 11 日发布,并基于 Apache License v2 许可发布。
Gerrit was developed by Shawn Pearce at Google which is written in Java, Servlet, GWT(Google Web Toolkit). The stable release of Gerrit is 2.12.2 and published on March 11, 2016 licensed under Apache License v2.
Why Use Gerrit?
以下是您应该使用 Gerrit 的若干原因。
Following are certain reasons, why you should use Gerrit.
-
You can easily find the error in the source code using Gerrit.
-
You can work with Gerrit, if you have regular Git client; no need to install any Gerrit client.
-
Gerrit can be used as an intermediate between developers and git repositories.
Features of Gerrit
-
Gerrit is a free and an open source Git version control system.
-
The user interface of Gerrit is formed on Google Web Toolkit.
-
It is a lightweight framework for reviewing every commit.
-
Gerrit acts as a repository, which allows pushing the code and creates the review for your commit.
Advantages of Gerrit
-
Gerrit provides access control for Git repositories and web frontend for code review.
-
You can push the code without using additional command line tools.
-
Gerrit can allow or decline the permission on the repository level and down to the branch level.
-
Gerrit is supported by Eclipse.
Gerrit - Installation
在使用 Gerrit 之前,您必须安装 Git 并对一些基本配置进行更改。以下是如何在各个平台上安装 Git 客户端。
Before you can use Gerrit, you have to install Git and perform some basic configuration changes. Following are the steps to install Git client on different platforms.
Installation of Git Client
Linux
您可使用软件包管理工具在 Linux 中安装 Git。例如,如果您使用的是 Fedora,您可以使用如下命令 −
You can install the Git on Linux by using the software package management tool. For instance, if you are using Fedora, you can use as −
sudo yum install git
如果您使用的是基于 Debian 的发行版,例如 Ubuntu,那么使用如下命令 −
If you are using Debian-based distribution such as Ubuntu, then use the following command −
sudo apt-get install git
Windows
您可从 Git 网站下载 Git 以将其安装在 Windows 中。只需访问 msysgit.github.io 链接并单击下载按钮。
You can install Git on Windows by downloading it from the Git website. Just go to msysgit.github.io link and click on the download button.
Mac
Git 可以使用如下命令安装在 Mac 中 −
Git can be installed on Mac using the following command −
brew install git
安装 Git 的其他方式是,从 Git 网站下载它。只需访问 Git install on Mac 链接,该链接将安装适用于 Mac 平台的 Git。
Another way of installing Git is, by downloading it from Git website. Just go to Git install on Mac link, which will install Git for Mac platform.
Gerrit - Configure Git
安装完 Git 后,你需要自定义配置变量以添加你的个人信息。你可以使用名为 git config 且带有 -l 选项的 Git 工具来获取和设置配置变量(此选项提供当前配置)。
Once you have installed Git, you need to customize the configuration variables to add your personal information. You can get and set the configuration variables by using Git tool called git config along with the -l option (this option provides the current configuration).
git config -l
当你运行上述命令时,你将获得配置变量,如下面的图像所示
When you run the above command, you will get the configuration variables as shown in the following image

你可以随时使用命令再次更改自定义信息。在下一章中,你将学习如何使用 git config 命令配置用户名和用户电子邮件。
You can change the customized information any time by using the commands again. In the next chapter, you will learn how to configure the user name and user Email by using git config command.
Gerrit - Set Your Username & Email
可以通过设置 name 和 email 变量来跟踪每个提交。name 变量指定名称,而 email 变量识别与 Git 提交关联的电子邮件地址。可以使用以下命令设置这些变量 −
You can track each commit by setting name and email variables. The name variable specifies the name, while the email variable identifies the email address associated with Git commits. You can set these using the following commands −
git config --global user.email "your_email@mail.com"
git config --global user.name "your_name"
运行以上命令时,将得到用户名和电子邮件地址,如下面的图片所示。
When you run the above commands, you will get the user name and email address as shown in the following image.

Gerrit - Generate New SSH Key
SSH 代表安全外壳,有时称为安全套接字外壳协议,用于从远程计算机安全地访问网络服务。可以设置 SSH 密钥,以便在计算机和 Gerrit 之间提供可靠的连接。
SSH stands for Secure Shell or sometimes Secure Socket Shell protocol used for accessing network services securely from a remote computer. You can set the SSH keys to provide a reliable connection between the computer and Gerrit.
可以使用以下命令在 Git Bash 中查看本地计算机上的现有 SSH 密钥 −
You can check the existing SSH key on your local computer using the following command in Git Bash −
$ ls ~/.ssh
单击 Enter 按钮后,将看到现有 SSH 密钥,如下面的图片所示 −
After clicking the enter button, you will see the existing SSH key as shown in the following image −

如果您找不到任何现有的 SSH 密钥,那么您需要创建一个新的 SSH 密钥。
If you don’t find any existing SSH key, then you need to create a new SSH key.
Generating New SSH Key
您可以使用 Git Bash 中以下的命令为验证生成一个新的 SSH 密钥 -
You can generate a new SSH key for authentication using the following command in Git Bash −
$ ssh-keygen -t rsa -C "your_email@mail.com"
如果您已经有一个 SSH 密钥,那么请不要生成一个新密钥,因为它们会被覆盖。您只能在安装了 Git with Git Bash 时使用 ssh-keygen 命令。
If you already have a SSH key, then don’t a generate new key, as they will be overwritten. You can use ssh-keygen command, only if you have installed Git with Git Bash.
当您运行上述命令时,它将在 ~/.ssh 目录中创建 2 个文件。
When you run the above command, it will create 2 files in the ~/.ssh directory.
-
~/.ssh/id_rsa − It is private key or identification key.
-
~/.ssh/id_rsa.pub − It is a public tv.
Gerrit - Add Your SSH Key
您可以在不同的平台上向 ssh-agent 添加 SSH 密钥,进一步讨论。
You can add SSH key to the ssh-agent on different platforms discussed further.
Linux
在 Linux 系统上使用以下命令添加 SSH 密钥
Use the following command on Linux system to add SSH key
cat /home/<local-user>/.ssh/id_rsa.pub
Gerrit - Add SSH Key to your Gerrit Account
可以使用以下步骤将 SSH 密钥添加到 Gerrit 帐户 -
SSH key can be added to the Gerrit account using the following steps −
-
Step 1 − First create an account at wmflabs.org services.
-
Step 2 − Next sign in to the web interface for Gerrit.

-
Step 3 − Then in the top right corner, click your username and select the Settings option. Here, we have created an account with the name John to make use of Gerrit
-
Step 4 − Click the "SSH Public keys" option on the left-side menu and paste the SSH Public key in the field.

Gerrit - Add SSH Key to use with Git
你可以使用以下命令向 Git 添加 SSH 密钥 −
You can add SSH key to Git using the following commands −
-
Step 1 − Open Git Bash and get the ssh-agent using the following command.
$ eval 'ssh-agent'
-
Step 2 − Next, add the SSH key to the ssh-agent using the following command
$ ssh-add ~/.ssh/id_rsa
-
Step 3 − Now, run the ssh using the following command, which matches the SSH fingerprint used when logging for the first time.
$ ssh -p 29418 <user_name>@gerrit.wikimedia.org

在上面的屏幕截图中,你可以看到 xyz123 是实例 shell 帐户名称,它在创建 Gerrit 帐户时使用,而 Abc123 是你的 Gerrit 帐户的用户名。
In the above screenshot, you can see that xyz123 is a instance shell account name, which is used while creating Gerrit account and Abc123 is a user name of your Gerrit account.
Gerrit - Download Examples Using Git
你可以使用以下 Git Bash 命令下载示例以及在 gerrit.wikimedia.org 组织的任何项目的源代码。
You can download the example using Git along with the source code of any project organized at gerrit.wikimedia.org using the following Git Bash command.
$ git clone
ssh://<user_name>@gerrit.wikimedia.org:29418/mediawiki/extensions/examples
git clone 命令将目录克隆到新目录中;换句话说,获取现有存储库的副本。当您运行上述命令时,您会获得类似于以下内容的屏幕截图。
The git clone command clones a directory into a new directory; in other words gets a copy of an existing repository. When you run the above command, you will get a screenshot similar to the following.

上述命令克隆“例子”存储库,并从此存储库接收对象、文件等,并将它们存储在您本地分支中。
The above command clones the 'examples' repository and receives the objects, files, etc. from that repository and stores it in your local branch.
Gerrit - Installing Git-Review
您可以按照本章中所述,通过在各个平台安装 git-review 来使用 Gerrit。
You can work with Gerrit by installing git-review on different platforms as discussed in this chapter.
Windows
在 Windows 中,您可以按以下步骤安装 git-review。
In Windows, you can install the git-review as listed in the following steps.
Step 1 − 首先安装 Python 以安装 git-review。
Step 1 − First install Python for installing git-review.

Step 2 − 在默认目录(如 C:\Python27)保留 Python 安装,而不是安装在其他目录中。
Step 2 − Keep the Python installation in the default directory (like C:\Python27) instead of installing in any other directory.
Step 3 − 接着,使用路径 C:\Python27\;C:\Python27\Scripts\; 设置 Python 脚本目录的环境变量
Step 3 − Next, set the environment variables for Python scripts directory using the path as C:\Python27\;C:\Python27\Scripts\;
git_review_install
Step 4 − 在版本 2.7 中,Python 将自动安装 pip。对于旧版本的 Python 2.7,您可以按照此 link 中所述安装 pip。
Step 4 − With version 2.7, Python will install pip automatically. For older version of Python 2.7, you can install pip as described in this link.
Step 5 − 运行开放 Git Bash,并使用如下命令安装 git-review。
Step 5 − Run open Git Bash and install the git-review using the following command.
$ pip install git-review
Linux
在 Linux 中,您可以按照以下步骤安装 git-review −
In Linux, you can install git-review as described in the following steps −
Step 1 Linux 平台的用户在共享主机上没有 root 访问权限。因此,如果您没有 root 访问权限,您可以使用如下命令在用户目录中本地安装 git-review −
Step 1 Users of Linux platform do not have root access on shared host. Hence, without root access, you can install git-review locally in user directory using the following commands −
virtualenv --python=/usr/bin/python2.6 virtualenv
virtualenv/bin/pip install git-review==1.21
Step 2 − 您可以使用两种方式扩展到本地二进制文件的路径 −
Step 2 − You can extend the path to the local binaries using two ways −
PATH=$PATH:~/virtualenv/bin/
PATH=~/virtualenv/bin/:$PATH
Step 3 − 现在,使用如下命令设置使用 Gerrit 的工作。
Step 3 − Now, use the following command to set up the work with Gerrit.
git review -s
or
~/virtualenv/bin/git-review -s
Step 4 − 对于 root 访问权限,可以使用如下命令安装 git-review。
Step 4 − With root access, git-review can be installed using the following command.
sudo apt-get install git-review
Step 5 − 如果在安装 Python 后没有 apt-get,那么使用如下命令。
Step 5 − If there is no apt-get after installing Python, then use the following commands.
$ sudo easy_install pip
$ sudo pip install git-review==1.21
Step 6 − 运行以下命令使用 Gerrit。
Step 6 − Run the following command to work with Gerrit.
git review -s
Mac OS X
在 Mac 中,你可以使用以下步骤安装 git-review。
In Mac, you can install the git-review using the following steps.
Step 1 − 从此处安装 Homebrew link.
Step 1 − Install the Homebrew from this link.
Step 2 − 接着,使用以下命令安装 git-review。
Step 2 − Next, install the git-review using the following command.
brew install git-review
Gerrit - Configuring Git-Review
Gerrit 构建在 Git 版本控制系统之上,后者从其他主机提取代码,向代码推送更改,提交代码以供审阅,等等。Git 的默认远程名称是 origin,我们通过使用以下命令告诉 git-review 使用此名称“origin”。
Gerrit is built on top of Git version control system, which extracts the code from other host, pushing changes to the code, submitting the code for review, etc. The default remote name of Git is origin and we tell git-review to use this name 'origin' by using the following command.
$ git config --global gitreview.remote origin
Gerrit - Setting Up Git-Review
Git-review 可用于将 git 分支发送到 Gerrit 以供审查。您可以在项目目录中使用以下命令设置 gitreview。
Git-review can be used to send git branches to Gerrit for reviewing. You can set up gitreview using the following command in the project directory.
$ git review -s
Git-review 可以用作配置 Git clone、将分支提交至 Gerrit、获取现有文件等的命令行工具。默认情况下,Git-review 查找名为 gerrit 的用于与 Gerrit 协同工作的远程。
Git-review can be used as the command line tool for configuring Git clone, submitting the branches to Gerrit, fetching the existing files, etc. Git-review looks for the remote named gerrit for working with Gerrit by default.
如果 git-review 找到 Gerrit 远程,则它将在远程位置将分支提交至 HEAD:refs/for/master ;如果不存在 Gerrit 远程访问权限,则 git-review 将查找存储库根目录下的 . gitreview 文件以及 gerrit 远程信息。
If git-review finds the Gerrit remote, then it will submit the branch to HEAD:refs/for/master at the remote location and if there is no Gerrit remote access, then git-review looks for the .gitreview file at the root of the repository along with the gerrit remote information.
Git-review 在内部处理以下内容:
Git-review processes the following internally −
-
It will check whether the remote repository works or not for submitting the branches.
-
If there is no Gerrit remote access, then it will ask for the username and try to access the repository again.
-
It will create a remote access called gerrit that points to Gerrit.
-
It will install the commit-msg hook.
Gerrit - Update Master
您可以使用以下命令使主分支保持最新。git-pull 命令从另一个本地分支获取或与另一个存储库集成。
You can make the master branch up-to-date using the following command. The git-pull command fetches from another local branch or integrates with another repository.
git pull origin master

-
The command will pull changes from the origin remote (URL of remote to fetch from), master branch and merge the changes to local checked-out branch.
-
The origin master is a cached copy of the last pulled from the origin.
-
Git pull is a combination of git fetch (fetches new commits from the remote repository) and git merge (integrates new commits into local branch).
-
Git pull merges the local branch with the remote branch by default.
Gerrit - Create a Branch
你可以使用以下命令在本地计算机上创建分支。
You can create a branch on the local machine using the following command.
$ git checkout -b name_of_branch origin/master
以上命令创建了新的分支,如下面屏幕截图所示。
The above command creates a new branch as shown in the following screenshot.

在这里,我们使用 branch123 作为新的本地分支。你可以使用以下命令在“master”中显示新分支。
Here, we have used branch123 as the new local branch. You can show the new branch from the 'master' using the following command.
$ git branch
以上命令产生了如下图所示的结果。
The above command produces the result as shown in the following screenshot.

Git checkout 在本地分支之间导航,更新工作目录中的文件,并通知 Git 在该本地分支上记录提交。
Git checkout navigates between the branch, updates the files in the working directory, and informs Git to record the commits on that branch.
Gerrit - Make & Commit Your Change
当您修改本地文件系统中的代码时,您可以使用以下命令检查目录中的更改。
When you modify the code in the local file system, you can check for the changes within the directory using the following command.
$ git diff
在项目目录中,我们将修改名为 Example/Example.hooks.php 的文件中的某些更改并运行上述命令。我们会获得如下图所示的结果。
In the project directory, we will modify some changes in the file called Example/Example.hooks.php and run the above command. We will get the result as shown in the following screenshot.

您可以使用以下命令检查对文件或目录所做的更改。
You can check the changes made to the files or the directory using the following command.
$ git status

上述命令允许查看哪些更改已暂存,哪些更改未暂存,以及哪些文件未被 Git 跟踪。
The above command allows to see which changes have been staged, which have not, and which files are not tracked by Git.
接下来,您可以使用以下命令将更改添加到工作目录并在下一次提交中更新文件。
Next, you can add the changes in the working directory and update the file in the next commit using following command.
$ git add Example/Example.hooks.php
添加文件后,再次运行 git status 命令以查看添加到暂存区域的更改,如下图所示。
After adding the file, again run the git status command to review the changes added to the staging area as shown in the following screenshot.

您可以使用以下命令查看索引和上次提交之间的差异,以及暂存了哪些内容。
You can see the difference between the index and your last commit, and what contents have been staged, using the following command.
$ git diff --cached

你可以使用以下命令将变更从本地存储库推送到远程目录。
You can push the changes to the remote directory from the local repository using the following command.
$ git commit
当你运行上述命令时,它会要求添加对你的变更进行提交的消息。当你在其他存储库中推送提交时,其他人在看到该提交时会看到此消息。
When you run the above command, it will ask to add the commit message for your changes. This message will be seen by other people when you push the commit to the other repository.

添加提交消息,然后再次运行命令,例如 git commit,它会显示提交消息,如下图所示。
Add the commit message and run the command again as git commit, which will display the commit message as shown in the following screenshot.

Gerrit - Prepare Push Change Set to Gerrit
在将更改合并到 master 之前,需要在 Gerrit 中查看这些更改。可以同步在 master 中发生的更改。在已处理的分支中使用以下命令。
You need to review the changes in Gerrit before merging them into the master. The changes can be synchronized that have occurred in the master. Use the following command within the branch that you have been working on.
$ git pull --rebase origin master
-
The above command will fetch the changes or commits from the remote branch and rebase the commits on top of the master.
-
When you are done with the changes and rebased the commits, you can push your change set to Gerrit for review.
-
Git pull --rebase is often used when changes do not deserve a separate branch.
-
Git pull is a combination of git fetch and git merge; where as git pull --rebase is a combination of git fetch and git rebase.
首先,运行命令 git pull origin master,如下面的屏幕截图所示。
First, run the command as git pull origin master as shown in the following screenshot.

现在使用命令 git rebase master 对提交重新进行基于更改,如下面的屏幕截图所示。
Now use the command as git rebase master to rebase the commits as shown in the following screenshot.

Gerrit - Push Your Change Set to Gerrit
您可以使用 git-review 命令提交补丁进行审阅。可以通过运行以下屏幕截图中所示的 git review -R 命令将更改集推送到 Gerrit。
You can submit the patches for review by using the git-review command. The change set can be pushed to Gerrit, by running the git review -R command as shown in the following screenshot.

-R 选项通知 git-review 在将 git 更改提交到 Gerrit 之前不完成重新变基。
The -R option informs git-review not to complete rebase before submitting git changes to Gerrit.
可以使用以下命令将代码提交到 master 以外的其他分支。
You can submit the code to other branch rather than the master, using the following command.
git review name_of_branch
还可以在使用以下命令将其提交到其他远程。
It is also possible to submit the code to a different remote, using the following command.
git review -r name_of_remote
Gerrit - View the Change / Next Steps
可以通过单击此 link 在 Gerrit 仪表板中查看更改。
The changes can be viewed in Gerrit dashboard by clicking in this link.

单击修改后的作者名称链接,您将获得以下屏幕截图。
Click the modified author name link, and you will get the following screenshot.

单击“diffusion”链接以查看更改的文件以及其他详细信息,如下面的屏幕截图所示。
Click the diffusion link to see the changed files with other details as shown in the following screenshot.

Gerrit - Editing via the Web-Interface
你可以在登录到 Gerrit 帐户后通过 Web 界面编辑项目,如下所示。
You can edit the project via the web interface after logging in to the Gerrit account as shown in the following steps.
Step 1 − 单击此 link 转到 Gerrit 仪表盘。你将获得以下屏幕截图。
Step 1 − Go to Gerrit dashboard by clicking this link. You will get the following screenshot.

Step 2 − 接着,单击“Project (项目)”列下指定 mediawiki/extensions/examples 的链接。
Step 2 − Next click the mediawiki/extensions/examples link specified under Project column.
Step 3 − 单击工具栏中的“General (常规)”链接,如下面屏幕截图所示。
Step 3 − Click the General link in the toolbar as shown in the following screenshot.

Step 4 − 当你打开“General (常规)”链接时,它会显示下图所示屏幕截图。
Step 4 − When you open the General link, it will show a screenshot as the following.

Step 5 − 单击“Create Change (创建更改)”按钮,它将打开一个弹出的窗口,其中包含一些详细信息,如下面屏幕截图所示。
Step 5 − Click the Create Change button and it will open a popup window with some details as shown in the following screenshot.

Step 6 − 输入信息,然后单击“Create (创建)”按钮。
Step 6 − Enter the information and click the Create button.
创建更改后,它将显示如下图所示的信息。
After creating the change, it will display the information as shown in the following screenshot.

Step 7 − 单击“Edit (编辑)”,然后单击“Add (添加)”。现在选择你要编辑的文件。在此处我们选择了文件 Example/i18n/en.json 。
Step 7 − Click Edit and then click Add. Now select the file you want to edit. Here we have selected the file Example/i18n/en.json.

当你打开该文件时,它将显示如下面屏幕截图所示的 json 数据。
When you open the file, it will show the json data as specified in the following screenshot.

Step 8 - 单击“保存”,然后单击“关闭”按钮。
Step 8 − Click Save and then click the Close button.
Step 9 - 最后单击“发布”按钮发布已编辑的文件
Step 9 − Finally click the Publish button to publish the edited file

Step 10 - 您可以通过单击“提交消息”链接来更改提交消息,如下面的屏幕截图所示。
Step 10 − You can change commit message by clicking the Commit Message link as shown in the following screenshot.

Step 11 - 按键盘上的 e 键并添加一些额外信息(如果您愿意),单击“保存”,然后单击“关闭”按钮。
Step 11 − Press e on the keyboard and add some extra information, if you wish to Click Save and then click the Close button.

Gerrit - Review before Merge
代码审查是 Gerrit 工作流中的一个重要部分。其基本理念是,必须在合并代码之前对其进行审查。
Code review is an important part of the workflow in Gerrit. The basic concept is that the code must be reviewed before being merged.
MediaWiki 的代码工作流可以在将其合并之前进行审查,也可以审查对 MediaWiki 外观和工作方式进行自定义的扩展。有一种特殊情况,你可以推送 internationalization and localization 提交。
The workflow of the code for MediaWiki can be reviewed before merging it and also extensions can be reviewed which customizes the MediaWiki looks and works. There is one special case in which you can push the internationalization and localization commits.
在完成开时,你可以将所有提交推送到远程分支。某人会将变更获取到本地,并通过创建合并提交将获取到的变更合并到本地主服务器中。你可以将这些变更推送至 refs/for/master 。
You can push all the commits to a remote branch when you finish the development. Someone will fetch the changes into local and merge those fetched changes into the local master by creating merge commit. You can push these changes to refs/for/master.
Gerrit - Project Owners
项目所有者是指项目属于提到的个人。项目所有者是虚拟组,其中无法添加成员或其他组。项目所有者提供访问权限,允许针对项目的不同组设置权限。
Project owner means that the project belongs to the person mentioned. Project owners is a virtual group in which you cannot add members or other groups in it. The project owner provides access rights to allow permission on the project to different groups.
可以使用以下步骤查看项目的访问权限。
You can view the access rights of your project using the following steps.
Step 1 − 通过单击此 link 打开 Gerrit 仪表板。
Step 1 − Open Gerrit dashboard by clicking this link.

Step 2 − 单击项目 → 列表选项。在项目列表中搜索项目,并单击该项目,如下面的屏幕截图所示。
Step 2 − Click Projects → List option. Search the project in your project list and click it as shown in the following screenshot.

Step 3 − 打开项目后,单击以下屏幕截图中所示的访问选项。
Step 3 − When you open your project, click the Access option as shown in the following screenshot.

Step 4 − 单击编辑选项。可以单击下拉菜单来更改访问权限。单击保存更改按钮,如下面的屏幕截图所示。
Step 4 − Click the edit option. You can change the access rights by clicking the dropdown menu. Click the Save Changes button as shown in the following screenshot.

How to Comment, Review, and Merge
任何人都可以在 Gerrit 中审阅代码并对代码进行评论。考虑以下步骤 −
Anyone can review the code and comment on the code in Gerrit. Consider the following steps −
Step 1 - 登录 Gerrit 以打开 Gerrit 仪表板,如前一章所述。
Step 1 − Login to Gerrit to open the Gerrit dashboard as specified in the previous chapter.
Step 2 - 现在,单击包含 Gerrit 项目、分支、更新日期等的任何主题,如下面的屏幕截图所示。
Step 2 − Now, click any subject which contains Gerrit project, branch, updated date, etc. as shown in the following screenshot.

Step 3 - 接下来,它将显示一个屏幕。单击“提交消息”选项,如下面的屏幕截图所示。
Step 3 − Next, it will display a screen. Click the Commit Message option as shown in the following screenshot.

更改集的重要字段类似于查看者、添加查看者、并排关闭等等。比较补丁集包括选择旧版本历史记录列表、展开较新的补丁集详细信息等等。查看和合并或拒绝代码包括放弃更改按钮、提交修补程序按钮,而这些按钮在当前版本的 Gerrit 中不存在。
The important fields of the change set are like Reviewers, Add Reviewer, Side-by-side off, etc. Comparing patch sets includes selecting the old version history list, expanding the newer patch set details, etc. Reviewing and merging or rejecting the code includes abandon change button, submitting patch button, etc. which are not present in the current version of Gerrit.