Difference between revisions 2699901 and 2706852 on mediawikiwiki

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

(contracted; show full){{anchor|Fetch external libraries}}
==== Узорак спољних библиотека ====

Почевши са mediawiki 1.25, неким страним библиотекама да mediawiki захтева више у то "језгро" гит гит.
Ми користимо [[composer]], да их управљају.
Да бисте инсталирали ове библиотеке је потребно, имате избор:


<div class="mw-translate-fuzzy">
* [https://getcomposer.org/doc/00-intro.md#globally преузмите и инсталирајте композитор], пребаците на ваш главни директоријум и покрените <kbd>''''''<code>composer install --no-dev'''</kbd>.</code>'''.
</div> Note that if you have an existing <code>composer.lock</code> file you will need to run <kbd> ''''''<code>composer update --no-dev'''</kbd></code>''' instead.

* 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 <kbdcode>git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git</kbdcode> to create a <code>vendor/</code> directory inside the core folder of your MediaWiki installation.

===== 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 <kbdcode>git pull</kbdcode> 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 <kbdcode>git pull --recurse-submodules</kbdcode>.

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, <kbdcode>vagrant git-update</kbdcode>, that performs all these steps.

=== Switching to a different version ===

Switching to a different version of MediaWiki is far simpler with Git than with SVN. Each of our versions are tracked as branches or tags. In order to switch to one of these, all you have to do is [https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging checkout] the particular branch or tag you want from within your MediaWiki clone directory:

{{#tag:source|
git checkout <branchname>
(contracted; show full)

* [[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:}}]]