brokenco.de/_posts/2008-11-24-why-we-chose-git...

29 lines
6.1 KiB
HTML

---
layout: post
title: Why we chose Git, a rebuttal.
tags:
- slide
- opinion
- software development
- git
nodeid: 198
created: 1227587078
---
One thing I learned early on in the internet, when is was more of a cobbling instead of a series, of tubes, was not to feed trolls. <img src="http://agentdero.cachefly.net/unethicalblogger.com/images/xkcd_duty_calls.png" height="250" align="right"/>That said, I found that my post "<a href="http://www.unethicalblogger.com/posts/2008/11/delightfully_wrong_about_git" target="_blank">Delightfully Wrong About Git</a>" had found it's way into such silly news aggregation machines as <a href="http://www.dzone.com/links/delightfully_wrong_about_git.html" target="_blank">DZone</a>, <a href="http://www.reddit.com/r/git/comments/7fdbd/delightfully_wrong_about_git/" target="_blank">Reddit</a> and <a href="http://news.ycombinator.com/item?id=374970" target="_blank">Hacker News</a>. Some of the points raised in the comments were valid and warrant a response, while the majority of them were the standard responses to <strong>any</strong> discussion about version control "psh, dumb. should have used [Bazaar/Mercurial/Darcs/Subversion/Team Foundation System]"
<br>
<br>
<strong><big>Why not another (D)VCS?</big></strong>
<br>
One of the most resounding criticisms/questions was this one, why not Bazaar? Why not Mercurial! My favorite, albeit childish, retort is "why?" But I can say that I have tried a variety of other version control systems, Git, Bazaar, CVS, Subversion, Perforce and some other proprietary VCSes at previous employers. While both Darcs and Mercurial seem to be very solid DVCSes, they suffer from a problem of momentum, Darcs in particular. They both appear to be victims of Git's success, while there is inherently nothing wrong with either of them, they are competing with Linus' love-child, Git. When chosing to move to a new VCS in a company that is well over 50+ employees, the staying power of the technology you chose is important. I feel confident that Git will not only be supported, but actively developed and improved for years to come.
<br>
<br>
More importantly than that though, <strong>I like Git</strong>. Is that not enough right there? <a href="http://slide.com" target="_blank">Slide</a> makes excessive use of branches, tags and other "complex" VCS concepts that centralized systems like CVS and Subversion have trouble with.<img src="http://agentdero.cachefly.net/unethicalblogger.com/images/branch_madness.jpeg" width="300" align="left" hspace="4" alt="Git Branch Madness!" title="Git Branch Madness!"/> With Subversion creating branches in the volume in which we create branches spiralled out of control with branches becoming "stale" quickly, meaning that if we didn't refresh the branch regularly with updates from trunk it would be nearly impossible to cleanly merge back down into trunk. With my current Git clone of our primary repository, I have 23 branches (roughly 6 personal local branches, 5 old branches, and 12 active branches). Our primary Git repository has been online for about 6 months and currently has 68 branches in it, rougly 55 are active. <blockquote>Why all the love for Git, but nobody every talks about Bazaar, Mercurial, Darcs, etc? Sure Git is faster, but unless you've got a enormous code base (like the linux kernel), it seems like Bazaar or Mercurial would be a better choice than Git.</blockquote>
<br>
One of the better known selling points of Git is that <strong>it's fast</strong>. My cloned repository of the primary Slide Git repository weighs in at a hefty <strong>7.1GB</strong>. The latest revision number in our Subversion repository is in the 103,000 range, tacked onto that our tree is just over 2GB in size, and you've got a lot of history to keep track of. Git handles this without a sweat. despite hitting the disk extremely hard when switching to a very out of date branch. With <a href="http://kerneltrap.org/mailarchive/git/2008/10/29/3859494" target="_blank">this fix</a> from Nico, the last of the mmap(2) allocation issues we were experiencing vanished as well.
<br>
<br>
<strong><big>Stop re-inventing the wheel!</big></strong>
<br>
One of the more interesting sentiments I noticed perusing the various comments made regarding my previous post were that we are "re-inventing the wheel" by writing scripts, hooks and other wrappers to use a product like Git. The notion that having scripts and hooks for something you use in daily development is re-inventing the wheel, or gratuituous strikes me as laughable at best. We're developers. We write scripts. Why didn't I ever write a myriad of scripts when I was an avid Subversion user? <a href="http://www.unethicalblogger.com/posts/r_tyler_ballance/subversion_branching_with_less_pain" target="_blank"><strong>I did.</strong></a>. There's an enormous different between writing scripts to compensate for a poorly performing product, and writing scripts to further enhance you or your colleagues' workflows, <a href="http://www.kernel.org/pub/software/scm/git/docs/githooks.html" target="_blank">Git's hook support</a> falls into the latter category.
<br>
<br>
The "religion" aspect of the whole version control debate was never considered in our transition to Git, nor was the buzz. I'm far more interested in what makes other VCSes better or worse than Git, so that Git can be improved instead of a justification to ditch Git for yet-another-dvcs. I like to think of the various tools like version control that we developers use as something more relatable: work pants. A good pair of work pants should be flexible enough to allow you to get your work done, modest enough to stay out of the way and most importantly, a good pair of work pants should keep your junk safe ;)
<br>
<br>
I'm still happy to answer more specific questions about Git and how/why it works for us as well as it has, but I think most of the questions I've seen thus far have been answered above.
<br>
<br/>
<br>
<hr/>
<br>
<em>Did you know!</em> <a href="http://www.slide.com/static/jobs">Slide is hiring</a>! Looking for talented engineers to write some good Python and/or JavaScript, feel free to contact me at tyler[at]<a href="http://slide.com">slide</a>