Note: This page is a work in progress. GitHub support is not fully functional yet.
The authoritative repository for nearly all Wikimedia projects is https://gerrit.wikimedia.org. It is where we conduct code review with Gerrit software and trigger Continuous integration tests. There is some integration with the commercial service https://github.com.
Projects on GitHub…
- the core MediaWiki software is mediawiki/core in gerrit, with a mirror on GitHub.
- the Flow extension is mediawiki/extensions/Flow in gerrit, with a mirror on GitHub.
You can browse these projects on GitHub and even fork them.
… but not pull requests
Pull requests on GitHub will not turn into changes in gerrit for review. You can make them, but they will probably languish. You will have to create a gerrit change for review from your pull request, or ask someone else. It's possible to automate this and some code has been written, but more work is needed for bidirectional updates.
Setting up the GitHub triangular workflow
This is a guide on contributing to Wikimedia's Gerrit-hosted projects with a GitHub-based workflow. This guide is aimed mainly at Windows-based users that use GitHub for Windows (GitHub Desktop), but should also be usable for contributors who work from the console. However, for this last group, contributing using Gerrit/git-review is probably easier.
In this guide, I'm using the pywikibot repository as an example, but the same workflow can be applied to any repository hosted in WMF's Gerrit. The GitHub for Windows workflow has some issues (notably GHfW reporting an error while pushing).
The normal GitHub workflow is as follows:
- Clone from the original repository
- Push to your own repository
- Submit a pull request
We will set up this using GitHub for Windows:
Cloning the repository
- Go to
- Click 'Clone in Desktop'
GitHub desktop will now launch, and clone pywikibot, including all submodules.
Forking the repository
- Go to
- Click 'Fork'
A fork is now created under your GitHub username, e.g.
Setting up push options
We now want to configure git to pull from the central repository (https://github.com/<username>/pywikibot). For this, follow these steps:) and to push to your own repository (
- In GitHub for Windows, click tools » open a shell here
- In this shell, type these commands:
- git config remote.origin.pushurl https://github.com/<username>/pywikibot.git
- git config remote.origin.push +refs/heads/*:refs/heads/*
The first command configures your own GitHub repository as place to push, the second sets 'force push' as default - this will result in your fork to be always equal to what you have locally in GitHub for Windows.
Submitting a patch
- Make some changes
- In GitHub for Windows, click 'master' and type a branch name in the 'Filter or create new' field. Press Enter to create it.
- Select files to commit and press 'commit'
- Press 'publish'. Your changes are now pushed to your own repository on GitHub.
- Browse to
- Under 'Your recently pushed branches' click 'Compare & pull request'
- Add a note, then click 'Send pull request'
Updating a patch
- Make some changes
- Commit to the relevant branch
- Click 'sync'
- If you get an error message, click tools » open a shell here, and run 'git push'. This should always succeed.
- The change is automatically added to your pull request
Other github repositories
It's a mess! Here are a few of the existing Wikimedia-focused group repositories.
See also https://github.com/MWStake/nonwmf-extensions for a super-repository of MediaWiki extensions not hosted at Wikimedia.
Plus countless personal repositories.