Tshian-suá uì SVN kàu Git
So, you've got a SVN checkout of a development or a production Wiki, and you want to change it to a Git one...
Hi̍k-sin (nee "phase3")
This is currently untested and somewhat of a brain dump!
This is based on your wiki being at /var/www
, with the wiki files in the w directory .
- Make a backup of your files (doing your database aswell wouldn't be a bad thing)! If you want to keep any changes you've made to mediawiki code, save the results of
svn diff
. - Strip out all the old .svn folders (though, we possibly don't want to delete the ones from the extensions. Hmmm)
cd /var/www find ./w -name ".svn" -type d -exec rm -rf {} \;
- Do a Git clone into a new folder
- Anonymous:
git clone https://gerrit.wikimedia.org/r/mediawiki/core.git git
- Wikimedia developer account:
git clone ssh://<USERNAME>@gerrit.wikimedia.org:29418/mediawiki/core.git git
- Anonymous:
- Change this Git clone to the wanted version
cd git
- To make your Git clone use a branch:
git checkout origin/REL1_18
- To make your Git clone use a tag:
git checkout 1.18.2
- Copy this git clone over your SVN files
cd .. cp -ra git/. w/
- Party!
Bī-lâi king-sin
So, you need to do some updates, due to security updates, new releases or whatever. See Download from Git#Switching to a different version
Tshian-suá khok-tián
Some extensions have been moved to Git, some are still in Subversion. In the future this won't be the case, but now it is. Any extensions that are deployed on the Wikimedia Cluster have been migrated, along with some others at the authors request.
A similar process to what was done to migrate core (phase3) can be used for extensions.