Topic on Talk:Download from Git

*Surak* (talkcontribs)

After the line starting with 'If you're using a particular branch ...', the text provides the command

git pull

At least for MSysGit (Windows portable Git version) picking up the latest changes after switching to a particular release branch, it needs to be

git pull https://gerrit.wikimedia.org/r/p/mediawiki/core.git REL<release number>

After updating the repository, especially after switching to a particular release branch, I have to clean the local repository:

git clean -df -e extensions -f -q -x

I have no linux to compare with, therefore I did not add this to the article.

Krinkle (talkcontribs)

Using a forced git-clean is rather risky as it might also delete your LocalSettings.php and uploaded user files. Be careful with that.

Using git-clean should not be necessary. And for extensions the same process applies (use git pull).

Krinkle (talkcontribs)

Git pull should work just fine. Switching to a different release branch involves a few more commands than just git pull. But if you're using the "master" branch or the "REL1_19" branch and want to update it to the latest version within that branch, a pain "git pull" will work just fine.

Note that very few commits are made to a REL* branch after the first release (only minor releases). To checkout a new branch all you need to do fetch the data, create a new remote-tracking branch and check it out.

jdoe:/srv/example/mediawiki (REL1_18)$ git fetch && git branch REL1_19 -t origin/REL1_19 && git checkout REL1_19
jdoe:/srv/example/mediawiki (REL1_19)$

Using git-pull with an absolute url will also work but has side-effects.

Note that this is only needed when doing major upgrades from branch to branch. To update to the latest remote version of the branch you're already on, plain "git pull" will do.

Leucosticte (talkcontribs)

Suppose I upgrade MediaWiki to the latest stable release (in this case, v1.20.1). If I use git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/<EXT>.git there's a possibility that this latest development version of the extension will use features (e.g. hooks) that are only available in the alpha version of MediaWiki (in this case, v1.21), and therefore it might not work, right? Or would it probably be backward-compatible? I was going to do that with all my extensions. Thanks,

Reply to "Keeping up to date"