Gerrit/Tutorial/tl;dr

This is a very short guide to using Git and Gerrit for MediaWiki development. For more details, including troubleshooting, see Git/Workflow and Git/Tutorial.


 * General git setup: Create an SSH key and install and configure Git.
 * MediaWiki-specific setup: Get developer access and install git-review.

Get the code:



Write and send new code:

Go to Gerrit's web UI, click your change and write a reviewer name in the input box near the Add Reviewer button. If you don't know who to invite, ask on IRC.

If the reviewer asks you to make changes, you'll have to make them and amend your change:

To test or otherwise work with other people's code, just follow the same steps to amend a change described above, using the corresponding.

Commit messages
Write an awesome commit message:

(bug 12345) Fix the whoosamatchotske in the flibdinger

The whoosamatchotske was breaking at line 5791, because there was some confusion as to where the error handling should go. Now, we handle the errors pretty well and the flibdinger class appears to be working perfectly.

Further, we've managed to fix fifty tests that were failing. Win!

Terse messages can be harmful, because someone browsing the commit log might not understand what the commit actually does.

 fix some stuff

Typos in a commit message are also to be avoided, as A) they can hinder people from searching for particular strings ("fix" might be a cool thing to match on in the commit summaries, if you're an analytics-oriented person) and B) they might negatively affect the perception of the codebase.

 (bug 12345) Fik the whoosamathotske in the flibdinger

...