Is it safe to use Git for a production MediaWiki installation?

I’d like to update a MediaWiki installation for a friend and I’m just learning about something called “Git”. From what I can tell it’s a version control system that lets developers work together and collaborate on source code.

The benefit to an end-user like me is that it also seems to let me keep MediaWiki and its extensions up-to-date with a very simple command.

But I’m not sure if I’m understanding the functionality and the dangers right.

  1. Is Git indeed intended to be used like that, analogous to apt-get for desktop Linux?

  2. Can I limit myself to production, stable releases of MediaWiki and extensions instead of the latest developer versions? The official instruction page isn’t very clear; what’s the difference between a branch, a tag, and a branch or tag that “tracks” a stable release? All I want is the latest stable release copied over to my server. I’m not sure why they talk about tarballs either if Git handles all the file downloads already.

  3. Is there anything I should generally be concerned about when using Git in this fashion? Behind-the-scenes autoupdates? Slightly different releases from the web distributions of MediaWiki? Anything at all?

  1. Git is a versioning control system, not a packaging system, so it’s not quite like aptitude, but the end result is more or less the same for a PHP-based project like MediaWiki. It doesn’t do the install step that an apt-get install could.

  2. You can check out any branches you have access to (you need a developer login if you want the developer version.) That’s the power of Git - branching and versioning at an almost molecular level. Branches are usually tracking different versions, whereas tags are specific named 'nodes" on that branch, basically they are when a branch is considered “stable”, and all you have to do is make sure you’re checking out the stable branch you want, by name. From what I can tell, they’re saying that those tags are the same as the contents of the tarball - i.e. if you check out a tag named, say, ‘ver_1.5’ , it’s the same as if you downloaded and unpacked the tarball “MediaWiki_1.5.tar.gz”

  3. Git will only update when you tell it to, and you can get very granular with these, as to specific files and specific merge points, skipping unwanted updates etc. But the basic “git pull” on your chosen stable branch should be all you need. It seems like they’re saying those stable branches are the same as the web distros. If the web distro changes, you’ll have to checkout a new branch (not as bad as it sounds, since git is incremental and will only need to fetch the changes)

We use git for our company’s business code, but we host our own repos so we’re a closed universe, but I’ve also used Github for OS stuff, and it’s a lovely repo. I’m imagining the MediaWiki servers are the same.

Thank you! That answers all my questions succinctly and informatively :slight_smile:

I feel a lot more comfortable now and will try to convince the friend to let us switch to Git… sure beats manual wgets.