<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Why you should use a distributed version control system</title>
	<atom:link href="http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/feed" rel="self" type="application/rss+xml" />
	<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system</link>
	<description>mah-soo-koh-me</description>
	<lastBuildDate>Thu, 04 Mar 2010 22:53:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: M. Leblanc</title>
		<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/comment-page-1#comment-845</link>
		<dc:creator>M. Leblanc</dc:creator>
		<pubDate>Wed, 20 Aug 2008 09:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system#comment-845</guid>
		<description>John Kelvie: After some experimentation, git specifically does not have very fancy codeville-like merging algorithms.  The core merge algorithm is the classic 3-way merge, chosen to be simple and predictable rather than clever.

The idea is that if there&#039;s the potential for conflict between patches, having a set of human eyeballs examine the situation is a good thing.  Don&#039;t silently succeed but introduce bugs.

HOWEVER, there are a few other things that greatly help:

1) Proper merge history tracking.  Git can and will figure out the common ancestor for a merge simply and automatically.  If you&#039;ve ever gotten lost in a swamp of CVS branch tags, you will be amazed to learn that that&#039;s all totally unnecessary.  Git figures it out automatically for you with zero work on your part.  All because it understands that history is a directed acyclic graph and not a tree; a commit can have more than one parent.  Just &quot;git merge hisbranch&quot; and it&#039;s done. 

2) Recursive merge.  The classic &quot;unsolvable&quot; case for 3-way merging is the criss-cross merge.  On branch A are versions A1 and A2.  On branch B are versions B1 and B2.  Then branch A merges in B1, producing A3.  Branch B merges in A1, producing B3.  Then we want to merge A3 and B3.  What&#039;s the latest common ancestor, A1 or B1?  Git&#039;s recursive merge solves this in a very elegant way.  (Again, in the common case, it Just Works.)

3) git-rerere to resolve conflicts automatically.  If you do a merge, and encounter some conflicts, git can remember the conflict and how you solved it, and provide the same solution automatically next time.  It doesn&#039;t help at all the first time you see a conflict, but if you&#039;re doing a lot of merging, or doing test merges (like the linux-next tree that is an automatically generated daily merge of 50+ developer trees), it can save you from having to solve the same problem over and over again.

4) Small commits and branches.  The ability to do local commits lets you make many small commits rather than one big one.  This (and the git-bisect feature it enables) is gits Killer Feature IMHO.  With a centralized VCS, the individual developer gets no benefit from the VCS, and pressure to not make bad commits leads to longer commit cycles, which leads to larger and less comprehensible commits.  With git, I get to use a VCS as I&#039;m developing, and rather than producing a patch, I produce a branch, which is also a patch series.  I can use the &quot;infinite undo&quot; provided by the VCS as I&#039;m developing, and it&#039;s far easier to read a series of small changes that introduce necessary infrastructure one piece at a time than one big feature patch.

I really want to emphasize that.  The git equivalent of &quot;cvs commit&quot; is &quot;git push&quot;, sharing your changes.  That&#039;s the time you want to think carefully about whether you&#039;re ready.  CVS does&#039;t really have an equivalent of &quot;git commit&quot;, which is more like the save command in an edit-compile-test loop.

Git also has significant tool support for partial commits.  When you commit, you can commit only a subset of your edits.  This can be as simple as not including the &quot;CFLAGS+=-DDEBUG&quot; line in a Makefile, or you can split your hacking into multiple commits, or commit part of it and keep working on the rest.  I use this when, partway through developing a feature, I find a bug to fix or add a debugging feature to the code.

5) Git-rebase.  An alternative to merging is to &quot;rebase&quot; your code, applying it as a series of patches on top of a more recent &quot;trunk&quot; version than you originally branched from.  This is basically what &quot;cvs update&quot; does, but git lets you do it with a multi-commit branch rather than just your current edits.  This is generally how merge conflicts are handled in practice.  If a merge conflict exceeds the integrator&#039;s threshold of pain, he can bounce it back to the developer and ask for the branch to be rebased on top of a more recent version.  Since the branch is a series of small commits, conflicts in any individual patch tend to be simple to resolve.

6) git-rebase --interactive.  This lets you edit, rearrange, combine or split the changes in a branch.  So if your private development included some false starts and dead ends, or was generally developed in an order that is not the best for presentation, you can easily go back and clean it up, producing a branch to share that is in an easy-to-read order and makes you look like a programmer than never makes mistakes.  It&#039;s particularly useful for larger projects with code review requirements.</description>
		<content:encoded><![CDATA[<p>John Kelvie: After some experimentation, git specifically does not have very fancy codeville-like merging algorithms.  The core merge algorithm is the classic 3-way merge, chosen to be simple and predictable rather than clever.</p>
<p>The idea is that if there&#8217;s the potential for conflict between patches, having a set of human eyeballs examine the situation is a good thing.  Don&#8217;t silently succeed but introduce bugs.</p>
<p>HOWEVER, there are a few other things that greatly help:</p>
<p>1) Proper merge history tracking.  Git can and will figure out the common ancestor for a merge simply and automatically.  If you&#8217;ve ever gotten lost in a swamp of CVS branch tags, you will be amazed to learn that that&#8217;s all totally unnecessary.  Git figures it out automatically for you with zero work on your part.  All because it understands that history is a directed acyclic graph and not a tree; a commit can have more than one parent.  Just &#8220;git merge hisbranch&#8221; and it&#8217;s done. </p>
<p>2) Recursive merge.  The classic &#8220;unsolvable&#8221; case for 3-way merging is the criss-cross merge.  On branch A are versions A1 and A2.  On branch B are versions B1 and B2.  Then branch A merges in B1, producing A3.  Branch B merges in A1, producing B3.  Then we want to merge A3 and B3.  What&#8217;s the latest common ancestor, A1 or B1?  Git&#8217;s recursive merge solves this in a very elegant way.  (Again, in the common case, it Just Works.)</p>
<p>3) git-rerere to resolve conflicts automatically.  If you do a merge, and encounter some conflicts, git can remember the conflict and how you solved it, and provide the same solution automatically next time.  It doesn&#8217;t help at all the first time you see a conflict, but if you&#8217;re doing a lot of merging, or doing test merges (like the linux-next tree that is an automatically generated daily merge of 50+ developer trees), it can save you from having to solve the same problem over and over again.</p>
<p>4) Small commits and branches.  The ability to do local commits lets you make many small commits rather than one big one.  This (and the git-bisect feature it enables) is gits Killer Feature IMHO.  With a centralized VCS, the individual developer gets no benefit from the VCS, and pressure to not make bad commits leads to longer commit cycles, which leads to larger and less comprehensible commits.  With git, I get to use a VCS as I&#8217;m developing, and rather than producing a patch, I produce a branch, which is also a patch series.  I can use the &#8220;infinite undo&#8221; provided by the VCS as I&#8217;m developing, and it&#8217;s far easier to read a series of small changes that introduce necessary infrastructure one piece at a time than one big feature patch.</p>
<p>I really want to emphasize that.  The git equivalent of &#8220;cvs commit&#8221; is &#8220;git push&#8221;, sharing your changes.  That&#8217;s the time you want to think carefully about whether you&#8217;re ready.  CVS does&#8217;t really have an equivalent of &#8220;git commit&#8221;, which is more like the save command in an edit-compile-test loop.</p>
<p>Git also has significant tool support for partial commits.  When you commit, you can commit only a subset of your edits.  This can be as simple as not including the &#8220;CFLAGS+=-DDEBUG&#8221; line in a Makefile, or you can split your hacking into multiple commits, or commit part of it and keep working on the rest.  I use this when, partway through developing a feature, I find a bug to fix or add a debugging feature to the code.</p>
<p>5) Git-rebase.  An alternative to merging is to &#8220;rebase&#8221; your code, applying it as a series of patches on top of a more recent &#8220;trunk&#8221; version than you originally branched from.  This is basically what &#8220;cvs update&#8221; does, but git lets you do it with a multi-commit branch rather than just your current edits.  This is generally how merge conflicts are handled in practice.  If a merge conflict exceeds the integrator&#8217;s threshold of pain, he can bounce it back to the developer and ask for the branch to be rebased on top of a more recent version.  Since the branch is a series of small commits, conflicts in any individual patch tend to be simple to resolve.</p>
<p>6) git-rebase &#8211;interactive.  This lets you edit, rearrange, combine or split the changes in a branch.  So if your private development included some false starts and dead ends, or was generally developed in an order that is not the best for presentation, you can easily go back and clean it up, producing a branch to share that is in an easy-to-read order and makes you look like a programmer than never makes mistakes.  It&#8217;s particularly useful for larger projects with code review requirements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lightheatcode.com &#187; Blog Archive &#187; Discussion on Distributed Source Code Control</title>
		<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/comment-page-1#comment-648</link>
		<dc:creator>lightheatcode.com &#187; Blog Archive &#187; Discussion on Distributed Source Code Control</dc:creator>
		<pubDate>Wed, 09 Jul 2008 22:40:56 +0000</pubDate>
		<guid isPermaLink="false">http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system#comment-648</guid>
		<description>[...] read thisarticle touting the benefits of Distributed Version Control, in particular [...]</description>
		<content:encoded><![CDATA[<p>[...] read thisarticle touting the benefits of Distributed Version Control, in particular [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Kelvie</title>
		<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/comment-page-1#comment-639</link>
		<dc:creator>John Kelvie</dc:creator>
		<pubDate>Wed, 09 Jul 2008 04:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system#comment-639</guid>
		<description>I&#039;m intrigued. But to me the fundamental challenge with existing version control systems is the difficulty of merging change sets from multiple developers across the same set of code. To me, this issue comes down to the diffing/merging functionality provided by the software, and I haven&#039;t seen or heard of anything that really improves the state of the art. How does GIT address this? How does it make it easier to do? Are there specific branching and merging tools it provides? Is through the use of more atomic commits (which I could see helping to an extent, but only so far as it allows for changes to be small enought that there is no overlap, thus sidestepping the problem). 

I&#039;d be interested to hear your response on these areas.

-John</description>
		<content:encoded><![CDATA[<p>I&#8217;m intrigued. But to me the fundamental challenge with existing version control systems is the difficulty of merging change sets from multiple developers across the same set of code. To me, this issue comes down to the diffing/merging functionality provided by the software, and I haven&#8217;t seen or heard of anything that really improves the state of the art. How does GIT address this? How does it make it easier to do? Are there specific branching and merging tools it provides? Is through the use of more atomic commits (which I could see helping to an extent, but only so far as it allows for changes to be small enought that there is no overlap, thus sidestepping the problem). </p>
<p>I&#8217;d be interested to hear your response on these areas.</p>
<p>-John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Warner Onstine</title>
		<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/comment-page-1#comment-569</link>
		<dc:creator>Warner Onstine</dc:creator>
		<pubDate>Mon, 30 Jun 2008 15:33:19 +0000</pubDate>
		<guid isPermaLink="false">http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system#comment-569</guid>
		<description>Hey Kate, this is exactly what I was looking for! Thanks so much, I&#039;ve forwarded it to my team here in Tucson.</description>
		<content:encoded><![CDATA[<p>Hey Kate, this is exactly what I was looking for! Thanks so much, I&#8217;ve forwarded it to my team here in Tucson.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakub Narebski</title>
		<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/comment-page-1#comment-554</link>
		<dc:creator>Jakub Narebski</dc:creator>
		<pubDate>Sat, 28 Jun 2008 19:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system#comment-554</guid>
		<description>By the way, thank you very much for providing links to your other blog posts about (distributed) version control systems, but this had remind me what feature I am missing in your blog: &lt;b&gt;tagging&lt;/b&gt;.

For example I&#039;d like to read your other posts about scm / version control / git; currently I cannot without browsing through all other posts, some of which (like motorcycle gear posts) I am not very interested in...

This post is filled under &lt;a href=&quot;http://weblog.masukomi.org/category/uncategorized&quot; rel=&quot;nofollow&quot;&gt;&lt;i&gt;Uncategorized&lt;/i&gt;&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>By the way, thank you very much for providing links to your other blog posts about (distributed) version control systems, but this had remind me what feature I am missing in your blog: <b>tagging</b>.</p>
<p>For example I&#8217;d like to read your other posts about scm / version control / git; currently I cannot without browsing through all other posts, some of which (like motorcycle gear posts) I am not very interested in&#8230;</p>
<p>This post is filled under <a href="http://weblog.masukomi.org/category/uncategorized" rel="nofollow"><i>Uncategorized</i></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aristotle Pagaltzis</title>
		<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/comment-page-1#comment-553</link>
		<dc:creator>Aristotle Pagaltzis</dc:creator>
		<pubDate>Sat, 28 Jun 2008 13:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system#comment-553</guid>
		<description>&lt;blockquote&gt;There’s one caveat to cherry-picking, and this applies to centralized systems that can do it too: to do it well you must have commits that are a self contained and atomic as possible. If you make a commit with multiple features/fixes in it and later on you decide not to include one of them there’s no simple way to exclude just the bit you don’t want, because it’s mixed in with all the others.&lt;/blockquote&gt;

Actually, with git, you can – the power of rebasing allows you to go back, split the commit sensibly into several, and then transplant the rest of your history on top of that. I guess whether this is simple depends on your definition of simplicity, but git has enough tooling to support this procedure directly. In other DVCSs you have to painstakingly monkey around with far less powerful tools, and in centralised VCSs it is for all intents and purposes impossible to do it at all.

This is what I &lt;em&gt;love&lt;/em&gt; about git – in contrast to systems with immutable history, it doesn’t force you into any sort of careful premeditation where you try to anticipate all possible and impossible problems you may or may not realise yet. You go about business as usual, and if you belatedly notice a problem you hadn’t thought of or couldn’t even have been aware of at the time, you just go back and fix it. No sweat.

Git is humane, in the Jef Raskin sense of the word.</description>
		<content:encoded><![CDATA[<blockquote><p>There’s one caveat to cherry-picking, and this applies to centralized systems that can do it too: to do it well you must have commits that are a self contained and atomic as possible. If you make a commit with multiple features/fixes in it and later on you decide not to include one of them there’s no simple way to exclude just the bit you don’t want, because it’s mixed in with all the others.</p></blockquote>
<p>Actually, with git, you can – the power of rebasing allows you to go back, split the commit sensibly into several, and then transplant the rest of your history on top of that. I guess whether this is simple depends on your definition of simplicity, but git has enough tooling to support this procedure directly. In other DVCSs you have to painstakingly monkey around with far less powerful tools, and in centralised VCSs it is for all intents and purposes impossible to do it at all.</p>
<p>This is what I <em>love</em> about git – in contrast to systems with immutable history, it doesn’t force you into any sort of careful premeditation where you try to anticipate all possible and impossible problems you may or may not realise yet. You go about business as usual, and if you belatedly notice a problem you hadn’t thought of or couldn’t even have been aware of at the time, you just go back and fix it. No sweat.</p>
<p>Git is humane, in the Jef Raskin sense of the word.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakub Narebski</title>
		<link>http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system/comment-page-1#comment-551</link>
		<dc:creator>Jakub Narebski</dc:creator>
		<pubDate>Sat, 28 Jun 2008 11:01:09 +0000</pubDate>
		<guid isPermaLink="false">http://weblog.masukomi.org/2008/06/27/why-you-should-use-a-distributed-version-control-system#comment-551</guid>
		<description>Sidenote: Tailor can convert only single branches at time (at least till some time ago; I&#039;m not sure about current version as I cannot find relevant information in Tailor manual). I&#039;m not sure if it can handle nonlinear history. Because of its using &quot;replay&quot; paradigm it cannot be not slow.

But it looks like there is another contender in the field of repository conversion and commit interchange between different DVCS.  Well, it is not a tool, but &quot;fast-import&quot; format, originally created in git. Git has both fast-import and fast-export tool, the same is true for Bazaar-NG (by Canonical, GNU software) with bzr-fastimport plugin.

See also http://vcscompare.blogspot.com/2008/05/import-tools.html</description>
		<content:encoded><![CDATA[<p>Sidenote: Tailor can convert only single branches at time (at least till some time ago; I&#8217;m not sure about current version as I cannot find relevant information in Tailor manual). I&#8217;m not sure if it can handle nonlinear history. Because of its using &#8220;replay&#8221; paradigm it cannot be not slow.</p>
<p>But it looks like there is another contender in the field of repository conversion and commit interchange between different DVCS.  Well, it is not a tool, but &#8220;fast-import&#8221; format, originally created in git. Git has both fast-import and fast-export tool, the same is true for Bazaar-NG (by Canonical, GNU software) with bzr-fastimport plugin.</p>
<p>See also <a href="http://vcscompare.blogspot.com/2008/05/import-tools.html" rel="nofollow">http://vcscompare.blogspot.com/2008/05/import-tools.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
