{"id":2919,"date":"2014-08-30T12:45:50","date_gmt":"2014-08-30T16:45:50","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=2919"},"modified":"2014-08-30T12:45:51","modified_gmt":"2014-08-30T16:45:51","slug":"version-control","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=2919","title":{"rendered":"Version Control"},"content":{"rendered":"<p> <i>Everybody<\/i> agrees that version control (VC) is the right thing but, sadly, too often it&#8217;s ignored anyway. I use version control&#x2014;Git via Magit&#x2014;in two ways. First, it&#8217;s the primary way that I keep my machines synchronized. I could, of course, use something like Dropbox for this but Git works well for me and I&#8217;ve automated the process so I see no reason to change. The point is that synchronization is not something you <i>need<\/i> version control for. <\/p>\n<p> The real reason for VC is that you have a history of the changes you&#8217;ve made and that, as a result, it&#8217;s easy to drop back to a previous state if you code (or write) yourself into a box. Eric Raymond has a revealing post <a href=\"http:\/\/esr.ibiblio.org\/?p=6205\">neatly demonstrates the virtues of version control<\/a>. He writes about a \u201cphase-of-the-moon bug\u201d that, despite frequent and comprehensive regression tests, suddenly appeared after a commit. Nothing too strange about that but when he dropped back to the previous commit the regression tests still failed even though they had passed just a few minutes ago. <\/p>\n<p> It turned out that several commits had the mysterious bug but Raymond was able to locate the culprit pretty quickly with <a href=\"http:\/\/irreal.org\/blog\/?p=2363\">Git bisect<\/a>. Even if you&#8217;re not a Git user, you could still perform the bisection process manually although a good deal less conveniently. The real enabling mechanism was VC. Without it, he&#8217;d have had a long and frustrating ordeal of trying to locate each change and test if it was the genesis of the problem. <\/p>\n<p> I&#8217;ve heard many developers express the opinion that they don&#8217;t need VC because they work alone. As Raymond&#8217;s story illustrates, VC can save the day even for the lone developer<sup><a id=\"fnr.1\" name=\"fnr.1\" class=\"footref\" href=\"#fn.1\">1<\/a><\/sup>. Hop on over and read Raymond&#8217;s post and see if it doesn&#8217;t convince you that you should be using VC whether or not you&#8217;re working alone. <\/p>\n<div id=\"footnotes\">\n<h2 class=\"footnotes\">Footnotes: <\/h2>\n<div id=\"text-footnotes\">\n<div class=\"footdef\"><sup><a id=\"fn.1\" name=\"fn.1\" class=\"footnum\" href=\"#fnr.1\">1<\/a><\/sup> <\/p>\n<p class=\"footpara\"> The code Raymond was working on, GPSD, is, in fact, a multi-developer project but that doesn&#8217;t come into play here. The story takes place while he was working alone and all the code was his. <\/p>\n<\/div><\/div>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Everybody agrees that version control (VC) is the right thing but, sadly, too often it&#8217;s ignored anyway. I use version control&#x2014;Git via Magit&#x2014;in two ways. First, it&#8217;s the primary way that I keep my machines synchronized. I could, of course, &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=2919\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[37],"class_list":["post-2919","post","type-post","status-publish","format-standard","hentry","category-programming","tag-tech"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2919"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2919\/revisions"}],"predecessor-version":[{"id":2920,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2919\/revisions\/2920"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}