Gerrit/Tutorial/tl;dr/zh

开始之前

 * 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核心：

或一个扩展：

或一个皮肤：



编写补丁
Start your branch from the latest master:

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


 * 使用Gerrit时，在每个分支仅执行一次此操作. 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”铅笔按钮. 在输入框中填写审查者的名字. 如果您不知道要邀请谁，可以查看您所修改的组件的维护者列表，或在 上询问.



上传补丁
如果审查者让您做出更改，使用以下命令修改您的提交：


 * 例如网址https://gerrit.wikimedia.org/r/1234中的1234. This downloads and checks out the change request from Gerrit.
 * 编辑源文件做出您的更改.
 * 您可以多次执行此命令. 编辑提交信息时，须保持“Change-Id”这一行不变.
 * 这将以反映您更改的新补丁集版本更新Gerrit中的更改请求，并自动通知订阅的审阅者.

参见

 * 请尝试遵守我们的提交信息指引.
 * See also Getting reviews