Gerrit/Tutorial/tl;dr/zh

Prerequisites

 * 1) 安装Git和.
 * 2) Create a new SSH key to use with Wikimedia Gerrit:
 * 3) * Run the following from your terminal, substituting your email address: ssh-keygen -t ed25519 -C "your_email@example.com"
 * 4) * At the " " prompt, you can press Enter to accept the default if this is your first SSH key. Otherwise, customize it to something like
 * 5) * At the " " prompt, choose a strong passphrase. You will typically have to the first time on a given day when pulling or sending change requests.
 * 6) 创建一个维基媒体开发者账户.  Then, log in on gerrit.wikimedia.org and add your public key to your account. The public key is the content of
 * 7)  to set your email address, name, and SSH username.



获取源代码
Clone the repository using the command in the repository browser (e.g. https://gerrit.wikimedia.org/g/mediawiki/core). You can find these on the list, or from the extension infobox on mediawiki.org. The most commonly cloned repositories are:

对于MediaWiki核心：

或一个扩展：

或一个皮肤：

Write your patch
Start your branch from the latest master:

Now you can edit the code to make and test your changes. 当您满意并确认代码正常工作后：


 * 在Gerrit里，您应当只在每个分支中commit一次！ To fix mistakes, use.
 * 检查您的补丁确认您正在提交的内容无误. 按“q”退出.
 * 这会将补丁推送至Gerrit并创建一个变更请求. 如果您遇到报错并已安装了旧版的“gerrit-tools”程序，请尝试安装“git-review”.

You are encouraged to invite one or two maintainers as reviewers on your change. After creating the change request, the  will have printed the URL for you change request. You can also find your changes through your Gerrit dashboard. 在变更页面的“Reviewers”下，点击“Add Reviewer”铅笔按钮. 在输入框中填写审查者的名字. 如果您不知道要邀请谁，可以查看您所修改的组件的维护者列表，或在 上询问.

Update your patch
如果审查者让您做出更改，使用以下命令修改您的提交：


 * 例如网址https://gerrit.wikimedia.org/r/1234中的1234. This downloads and checks out the change request from Gerrit.
 * 对源文件做必要的修改.
 * 您可以多次执行此命令. 编辑提交信息时，须保持“Change-Id”这一行不变.
 * 这将在同一个Gerrit变更中创建一个新的补丁集，并发送一个邀请来再次审查代码.