{"id":451,"date":"2011-10-30T09:00:38","date_gmt":"2011-10-30T13:00:38","guid":{"rendered":"http:\/\/blog.payne.org\/?p=451"},"modified":"2011-10-30T09:00:38","modified_gmt":"2011-10-30T13:00:38","slug":"the-subtle-power-of-git","status":"publish","type":"post","link":"https:\/\/payne.org\/blog\/the-subtle-power-of-git\/","title":{"rendered":"The Subtle Power of Git"},"content":{"rendered":"<p>Unless you\u2019re a software developer, you\u2019ve probably never heard of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Git_(software)\">Git<\/a>. If I told you it\u2019s a source code version control system, you\u2019re might then think, \u201cwho cares?\u201d<\/p>\n<p>Occasionally, a tool comes along that quietly but powerfully changes the way things are done. Git is one of those tools. Developed <a href=\"http:\/\/marc.info\/?l=linux-kernel&amp;m=111288700902396\">out of necessity<\/a> by <a href=\"http:\/\/en.wikipedia.org\/wiki\/Linus_Torvalds\">Linus Torvalds<\/a> in 2005 to host the Linux kernel, it\u2019s recently <a href=\"http:\/\/qa.debian.org\/popcon-graph.php?packages=subversion+git+mercurial+bazaar&amp;show_installed=on&amp;show_vote=on&amp;want_legend=on&amp;want_ticks=on&amp;from_date&amp;to_date&amp;hlght_date&amp;date_fmt=%25Y-%25m&amp;beenhere=1\">exploded in popularity.<\/a><\/p>\n<p>For all of its features, Git\u2019s real power is enabling distributed, non-linear development. Because <a href=\"http:\/\/www.eecs.harvard.edu\/~cduan\/technical\/git\/git-2.shtml\">branches are effectively \u201cfree\u201d<\/a>, everything\u2019s done in branches. Developers typically work in their own branches. If a developer is fixing a bug, she might make a new branch, fix, test and commit, then merge that back into a working branch (or the main one).<\/p>\n<p>In contrast, with systems like <a href=\"http:\/\/en.wikipedia.org\/wiki\/Apache_Subversion\">Subversion<\/a>, there tends to be much less branching. Developers end up \u201chuddling\u201d around branches, and having to spend much more time coordinating commits. The usual result is that commits are larger and less frequent, which makes merging significantly more difficult.<\/p>\n<p>With Git, developers make small, frequent commits to their own working branches, then they merge that branch into the main one. Often, the merging can be automated: the merger has a much better chance of success with 10 small commits than one big one. Also, Git enables ad hoc sub-projects: two developers working in the same area can merge between themselves, then when done, offer up the combined branch to merge into the main project.<\/p>\n<p>But it\u2019s not enough to just start using Git &#8212; if your team uses Git like they use Subversion, you won\u2019t be getting the benefit. You\u2019ve also got to <a href=\"http:\/\/reinh.com\/blog\/2009\/03\/02\/a-git-workflow-for-agile-teams.html\">change your development workflows.<\/a><\/p>\n<p>Why aren\u2019t you using Git for your project?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unless you\u2019re a software developer, you\u2019ve probably never heard of Git. If I told you it\u2019s a source code version control system, you\u2019re might then think, \u201cwho cares?\u201d Occasionally, a tool comes along that quietly but powerfully changes the way &hellip; <a href=\"https:\/\/payne.org\/blog\/the-subtle-power-of-git\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/comments?post=451"}],"version-history":[{"count":0,"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/posts\/451\/revisions"}],"wp:attachment":[{"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/categories?post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/payne.org\/blog\/wp-json\/wp\/v2\/tags?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}