Switched to git

gitIn case you were wondering why there are no more new commits in our Mercurial repository since November:
As most of our developers were not content with Mercurial, we switched from Mercurial to git as our version control system.

The old Mercurial repository will soon be not available anymore, so make sure to check out the new git repository. PeterW updated our tutorials for building OpenClonk on Windows and explained the git workflow to those who are not familiar with git yet (or generally any distributed version control system).

I also adapted the looks of the OpenClonk git web frontend to fit into the rest of the site, it’s linked in our header. I expect that soon the autobuilds will follow and again be directly linked on the shortlog page.

  1. Y.A. says:

    Why git though? Mercurial is infinitely superior, sure, it’s a little, tiny tad bit slower, but it’s soooo much easier to use. No UNIX philosophy crap in the commands, no 500 MB download under Windows.

    Also, Mercurial has probably one of the best tutorial ever written for a piece of software ever:

    http://hginit.com/

    Git is simply not as accessible, and I think it will be a burden in getting new contributors.

  2. Clonk-Karl says:

    We have been using mercurial for several years and there was a poll amongst the regular contributors which revealed that the majorities prefers to switch to git. Personally, I find git much easier to use than hg, not the other way around, especially when it comes to branches or history rewriting.

  3. Nachtschatten says:

    Git. I wouldn’t have thought the OpenClonk team hates itself *that* much… Okay, okay, just kidding. Still, this switch raises a couple of questions for me.

    The first thing I find strange is: You switched to Git, even though almost all posts about it in your forum are about stuff that does *not* work, is *not* comfortable to do, or is inferior to other DVCSs. So Git isn’t actually the best tool for the job – it just won some kind of popularity contest in a typical bikeshed situation. At least that’s the impression this all makes. Aren’t there any technical reasons?

    The second thing is, why do you announce it only now? Did the switch really take *that* long to finish? If yes, what went wrong?

  4. Clonk-Karl says:

    I gave some technical reasons above: Easier branching and history editing. Also, it performs much better in terms of speed. If you refer to Peter’s merging thread when you are talking about things that do not work with git, then what I can say is that hg didn’t a better job there, either.

    The announcement came late because the web frontend was adapted to the openclonk.org design first, and it took a bit until someone sat down and just did it.

  5. Isilkor says:

    What triggered the switch to git was that we’ve had multiple committers lose work when they tried to rebase some changes in Mercurial. I’m aware that rebasing goes contrary to the Mercurial philosophy, which is that history is (should be) immutable, but regardless: having a VCS lose data during day-to-day operations is entirely inexcusable.

    Also, yes, the switch took that long; for one, we wanted to make sure there weren’t any problems with our workflow (for example the autobuild/development snapshot scripts had to be updated), plus there were the holidays which pretty much brought all work to a halt. We’re confident now that both the repository access as well as those scripts are (mostly?) working like we want them to, so now is as good a time as ever to announce the change.

  6. Sven2 says:

    Iirc, there was always strong desire to move to Git among the people who manage the repository. The only reason Mercurial won against Git in the first place was because the git Windows clients were all pretty poor back then and we needed something that simple, non-DCVS-savvy people could understand. TortoiseGit is a lot more usable for the basic operations now, so I guess the opposition dropped and the DCVS-wizards were happy to switch.

    I think one advantage of Git is that there’s a better file move detection and moved files keep their history.

  7. G says:

    The switch itself didn’t take long at all – a few hours, probably, including converting the repository twice because we took the opportunity to clean up botched author names like “C:\Users\Newton\AppData\Roaming\The Bat!” and missed a few on the first try. That’s one technical reason right there: Git user interfaces generally don’t let you embarrass yourself like that. The various other things like documentation, website theming, etc. were done when time was available and thus took longer.

    I personally didn’t have much problems with Mercurial, because I used git via hg-git instead, but several of our contributors managed to make Mercurial loose data. And this is a technical reason, not merely a UI problem: While mercurial and git share semantics to a degree that two-way-bridges like hg-git are possible, the underlying data storage Mercurial uses is simply inferior to the one that git uses. With git, you have to try really, really hard to loose data. And if you do, chances are that you merely misplaced it, and someone on IRC can tell you how to get it back via git reflog or .git/logs. Also, repository download sizes are significantly smaller.

  8. Thank you for your answers, that was very insightful. I think these reasons are interesting, shame that they weren’t included in the blog post. (Perhaps you can write a more detailed follow-up?)

    @Clonk-Karl: I didn’t consider “Personally, I find git much easier to use” to be a technical reason, sorry. Well, you and the others cleared that up. Yes, I referred to both Git threads by Peter.

    @G

  9. Newton says:

    This blog post was merely an announcement with the intention of informing and helping our contributors to adapt to the change of systems. I still see no reason why to give any technical reasons for this switch in the post as the decision has already been made so discussing this here would be pointless.

  10. > I still see no reason why
    … like being an interesting topic to some?

    I said nothing about discussing this. Still, there’s a lot of stupid blog posts out there about the various DVCS. So some insight from an actual, practical standpoint is interesting. Perhaps even something to refer to in a discussion elsewhere.

  1. There are no trackbacks for this post yet.

Leave a Reply