Git
- See Download from Git if you want to checkout the MediaWiki repository for installation and/or development.
Instead of using Subversion for developing MediaWiki, we're now using Git. See "Wikimedia engineering moving from Subversion to Git" for a summary and see Git conversion for details.
If you had a Subversion account, you probably have a Git account - try to log in, and if you have trouble, speak up in #mediawikiconnect.
Contents |
[edit] Has MediaWiki migrated to Git?
Yes; see our plan for Git conversion for February and March 2012. There are some outstanding Git migration issues as to how to lay out the repositories and what effect it will have on some automated and semi-automated workflows.
- TL;DR — a quick cheatsheet for basic tasks regarding mediawiki development using git/gerrit
- Tutorial — a step-by-step tutorial explaining how to work with our system (basics, collaborating, and troubleshooting)
- Workflow — Workflow for core and for any extensions or other tools that choose to use Git, Gerrit, git-review, etc.
- Git/Tips — Tips for working with Git
- Gerrit — Gerrit how-to's and tutorials
- Gerrit project ownership — Getting privileges to merge new code in
- Extensions queue — queue for moving extensions from Subversion to Git
- Git/New repositories — How to set up a new Wikimedia Git repository for your extension
- Conversion — Schedule for our Subversion-to-Git migration
- Issues — Outstanding Git conversion issues
- Git/Code review/guide - Guide for reviewers
The core has been migrated to Gerrit and can now be cloned either through HTTPS (read-only) or using SSH (writable).
Anonymous access (read-only):
git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git
Authenticated access (writable):
git clone ssh://<YOUR USERNAME>@gerrit.wikimedia.org:29418/mediawiki/core.git
Browse the Git Tree for MediaWiki Dev.
In the case that you see "The requested URL returned error: 403" or "error: The requested URL returned error: 403 while accessing https://gerrit.wikimedia.org/r/p/mediawiki/core.git" you need to check your git client version
git --version
and upgrade to at least git 1.7, versions 1.7.9.2 and 1.7.9.6 are known to work.[1]
[edit] Extensions
A list of extensions (as well as other repositories) can be viewed in in Gerrit. The repositories can be accessed by the following url pattern (the url is also shown on the gitweb overview of the repository (example for the Cite extension):
[edit] Separate
To check out an extension, clone the repository with your Git client of choice, or use the command line interface:
$ cd ./mediawiki/extensions $ git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ExtensionName.git
[edit] Universal
There is also a meta repository "mediawiki/extensions.git" where all repositories in the mediawiki/extensions/*
namespace are tracked as git submodules. This is (obviously) a very large amount of data (if downloaded completely).
Before you can do this, you'll have to remove the default (empty) extensions directory. If you have anything in here, rename it temporarily and later merge the contents into the new extensions directory.
$ cd ./mediawiki $ mv extensions/ extensions-old/
To set it up clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git:
$ cd ./mediawiki mediawiki$ git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git $ cd extensions
Now you can either manually initialize extensions you need (this is an easy way to check out extensions once set up):
mediawiki/extensions$ git submodule update --init SomeExtension mediawiki/extensions$ git submodule update --init SomeOtherExtension
Or to get all 400+ extensions:
mediawiki/extensions$ git submodule update --init
Go get a cup of coffee; it'll take a while to check out all the repos initially.
If you went with the meta-repo approach (which you probably checked out outside the mediawiki/core directory), be sure to put symlinks in place from within the extensions directory of your MediaWiki install to the individual extensions in your meta-repo clone.
[edit] References
- Git and gerrit in Wikimedia labs
- An intro-to-git "training mission"
- An introduction to git-svn for Subversion/SVK users and deserter by Sam Vilain
- GitMagic A git guide with translations - recommended
- A git branching model
- git: the simple guide
- Git Community Book will take you gently into Git internals. Actually it is very hard to "get" git until knowing something about how it works internally. After this, everything become simple, just hidden without convoluted and anti-productive user interface.
- How we're going to use Git: slides by Brion Vibber, as presented autumn 2011
- Audio from Git presentation by Brion Vibber, autumn 2011
- Notes from Brion's presentation
- Git's website with documentation
- MediaWiki Git Guide (MGG) - selection of relevant Git pages in the MW Virtual Library; for PDF generation or printing
- A very useful Git guide
Also useful (if you subtract away GitHub stuff):
[edit] See also
- List of projects on Git; to browse through the code, select the project (core, extension, etc.) from the list, then click on “Branches”, then in the line “HEAD” on “gitweb” and finally on “tree”
Git | Git intro · Download from Git · Our Git workflow · Commit message guidelines · Request a new Git repository · Migration to Git · Outstanding Git conversion issues · Git GUI applications more.. » |
---|
Language: | English |
---|