Difference between revisions 2678602 and 2699901 on mediawikiwiki

<languages />
: "Јер mediawiki верзија 1.19beta2, 1.18.2, 1.17.3, језгра mediawiki и додатака користе [[$Special:MyLanguage/Gerrit|у гит]] за контролу верзије. За старије верзије, погледајте [[$SVN|са субверзија]]"

(contracted; show full)

* If you  don't want to use composer, or if you want to use the same set of vendor libraries as used on the WMF production cluster, you can instead <kbd>git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git</kbd> to create a <code>vendor/</code> directory inside the core folder of your MediaWiki installation.
 Make sure you use the right branch for your MediaWiki version (e.g. <code>REL1_25</code> for 1.25).

==== Specific MediaWiki versions====

===== WMF branches =====

Remote branches track the MediaWiki versions used on the Wikimedia Foundation server cluster. These may not be entirely stable, but they receive very quick bug fixes and are generally stable enough &ndash; after all, these are what major projects such as Wikipedia are using. Once a REL* branch is considered 'stable', we '[[#MediaWiki_tags_.28stable_version.29|tag]]' it and turn it into a tarball release.

To see what branches are available, switch to your MediaWiki core directory and enter the following command:

<source lang=bash>
git branch -r | sort -V
</source>

Major releases are denoted by "origin/REL<release number>", e.g. "origin/{{MW stable branch git}}". To switch to a particular release branch:

{{#tag:source|
git checkout -b REL<release number> origin/REL<release number>
|lang=bash}}

For example, to switch to the current stable version, {{MW stable release number}}, enter:

{{#tag:source|
git checkout -b {{MW stable branch git}} origin/{{MW stable branch git}}
|lang=bash}}

===== MediaWiki tags (stable version) =====

Alternatively, specific stable versions of MediaWiki are tracked using 'tags'. These are analogous to the tarball releases. You can see the versions available with:

<source lang="bash">
git tag -l | sort -V
</source>

Using non GNU sort command, such as on Mac OS X, you have to rely on the good old separators:

<source lang="bash">
git tag -l | sort -n -t. -k1 -k2 -k3
</source>

To use a specific tag:

{{#tag:source|
git checkout <tag name>
|lang=bash}}

==== Latest development version of MediaWiki ====

The latest development version of MediaWiki is tracked in the 'master' branch. This is what is locally checked out by default when you first clone the MediaWiki repository. If you have switched to another branch but would like to switch back to using bleeding-edge MediaWiki, do:

<source lang="bash">
git checkout master
</source>


=== Keeping up to date ===

If you're using a particular branch or the development version ("master" branch) of MediaWiki, picking up the latest changes is relatively easy. Change into your MediaWiki clone directory and issue the <kbd>git pull</kbd> command:

<source lang="bash">
git pull
</source>

All of the latest changes for the branch you are using will be applied.

The new version of core may require newer versions of extensions and skins, so you must go into each extension and skin directory and update it with a command like <kbd>git pull --recurse-submodules</kbd>.

After updating/upgrading you should run the MediaWiki <code>{{ll|Manual:update.php|update.php}}</code> command-line script to update database tables as needed:

<source lang="bash">
php maintenance/update.php
</source>

You also need to update <code>mediawiki/vendor</code> to any newer versions of required libraries, see [[#Fetch external libraries]].

If you use [[MediaWiki-Vagrant]], it offers a single command, <kbd>vagrant git-update</kbd>, that performs all these steps.

(contracted; show full)

Detailed installation instructions are available on each skin's page here on MediaWiki.org, for example see [[Special:MyLanguage/Skin:Vector#Installation|Skin:Vector#Installation]]. Instructions for all other skins are analogous.

== See also ==

* [[Special:MyLanguage/Migrating from SVN to Git|Migrating from SVN to Git]]
* [[Special:MyLanguage/Nightlies|Nightlies]], an alternate to downloading from Git

* [[Special:MyLanguage/Intranet/Intranet Installation|Intranet/Intranet Installation]], part of a fully worked series of articles that uses Git for Mediawiki deployment
[[Category:MediaWiki development{{#translation:}}]]
[[Category:MediaWiki Introduction{{#translation:}}]]
[[Category:Installation{{#translation:}}]]
[[Category:Git{{#translation:}}]]