Install git:
sudo aptitude install git
Clone from repo (in site root path):
cd www/site.ru/
git clone -b REL1_23 https://gerrit.wikimedia.org/r/p/mediawiki/core.git ./
Clone
MonoBook
skin in skins folder:
cd www/site.ru/skins/
git clone https://git.wikimedia.org/git/mediawiki/skins/MonoBook.git
In the end of .htaccess
add:
RedirectMatch 404 ^.*\.git.*$
Copy from old db to new (type pass two times):
mysqldump -u root -p -v db1 | mysql -u root -p db2
Copy extensions/
folder. Copy images/
except images/thumb/
. Copy .htaccess
from root folder. Copy favicon.ico
, logo/
folder, robots.txt
.
php maintenance/update.php
php maintenance/rebuildtextindex.php
In .git/info/exclude
(because .gitignore
exists in MW repo :(
) add paths and files to exclude from git index and from untracked (will not showing in git status
):
robots.txt
images/math/
logo/
webstat/
git update-index --assume-unchanged
not working for new files :(
$ cd extensions
$ git clone -b REL1_23 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Math.git
$ cd extensions/Math/math
$ make
$ cd extensions/Math/texvccheck/
$ make
Add the following code at the bottom of your LocalSettings.php
:
require_once("$IP/extensions/Math/Math.php");
- Extension:CategoryTree
- Extension:Replace Text
- Extension:ParserFunctions
- Extension:UserMerge
- Extension:CharInsert
- Extension:Cite
Download updates but not apply:
git fetch origin
Watch changes (full):
git diff HEAD origin/REL1_23
Short:
git diff --stat HEAD origin/REL1_23
Apply changes:
git merge origin/REL1_23
Remove from index but not from disk:
git rm -r --cached file.txt
git show --pretty=raw f02685a775e4
Switch to new branch (release):
# download changes
git fetch origin
# switch to new branch
git checkout -b REL1_24 origin/REL1_24
git checkout <filepath>
git checkout origin/master <filepath>
git log
git reset --soft HEAD~1