Gerrit/チュートリアル/tl;dr

This page is a translated version of the page Gerrit/Tutorial/tl;dr and the translation is 56% complete.
この短い TLDR スタイルのガイドは、Git にある程度の経験があり、MediaWiki の開発を始めたい開発者を対象としています。 説明を含むチュートリアルは、Gerrit/チュートリアル を参照してください。

要件

コードを取得

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 コアの場合: git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki

拡張機能の場合: git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/<拡張機能名>.git

外装の場合: git clone https://gerrit.wikimedia.org/r/mediawiki/skins/<外装名>.git

Write your patch

Start your branch from the latest master:

mediawiki$ git checkout master
mediawiki$ git pull
mediawiki$ git checkout -b 有意義なブランチ名

Now you can edit the code to make and test your changes. コードが満足のいく状態になり、操作準備ができたら:

  • git commit --all Gerrit を使用する際には、ブランチごとにこれを 1 回だけ行なってください。 To fix mistakes, use git commit --amend.
  • git show Review your patch to confirm what you are submitting to us. 終了するには「q」を押します。
  • git review -R This pushes to Gerrit and creates a change request. If you receive an error and have previously installed the older "gerrit-tools" program, install "git-review" instead.

You are encouraged to invite one or two maintainers as reviewers on your change. After creating the change request, the git review will have printed the URL for you change request. You can also find your changes through your Gerrit dashboard. 変更のページで、「Reviewers」配下の「Add Reviewer」と書かれた鉛筆ボタンをクリックします。 入力欄にレビュアー名を入力します。 レビュアーとして誰を招待すべきか分からない場合は、あなたが変更したコンポーネントのメンテナ一を確認するか、IRC (#mediawiki 接続) でお尋ねください。

Update your patch

レビュアーがあなたに変更を依頼した場合は、それらの変更をして当該コミットを以下のように amend (修正) します:

  • git review -d 変更ID 例: https://gerrit.wikimedia.org/r/1234 の 1234 This downloads and checks out the change request from Gerrit.
  • Edit the source files to make your changes.
  • git commit --all --amend この作業は複数回できます。 コミット メッセージを変更する際は、「Change-Id」の行はそのままにしてください。
  • git review -R This updates your change request in Gerrit, with a new patch set version reflecting your change, and automatically notifies the subscribed reviewers.

関連項目