<?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: git: fetch and merge, don&#8217;t pull</title>
	<atom:link href="http://longair.net/blog/2009/04/16/git-fetch-and-merge/feed/" rel="self" type="application/rss+xml" />
	<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/</link>
	<description>(occasional miscellanea)</description>
	<lastBuildDate>Fri, 20 Jan 2012 22:42:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Roy Badami</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-58744</link>
		<dc:creator>Roy Badami</dc:creator>
		<pubDate>Thu, 19 Jan 2012 21:26:49 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-58744</guid>
		<description>Oh, and I don&#039;t think (although I haven&#039;t used it) that &quot;hg pull -u&quot; will ever perform a merge unless there are any uncommitted changes in the working directory - everything I can see just says it&#039;s equivalient to &quot;hg pull; hg update&quot; which will just pull changes in, and then update the working copy to the latest revision in the current branch.

But whoa!, I didn&#039;t know about hg fetch.  Talk about implicit, not only does it implicitly merge, it even implicitly commits the results of the merge.  (Ok, I imagine you&#039;ll get prompted for a commit message, so you&#039;re unlikely to do so by accident, but still...  IMHO something as wacky as fetch should be an Hg extension so you have to explicitly enable it....)

roy</description>
		<content:encoded><![CDATA[<p>Oh, and I don&#8217;t think (although I haven&#8217;t used it) that &#8220;hg pull -u&#8221; will ever perform a merge unless there are any uncommitted changes in the working directory &#8211; everything I can see just says it&#8217;s equivalient to &#8220;hg pull; hg update&#8221; which will just pull changes in, and then update the working copy to the latest revision in the current branch.</p>
<p>But whoa!, I didn&#8217;t know about hg fetch.  Talk about implicit, not only does it implicitly merge, it even implicitly commits the results of the merge.  (Ok, I imagine you&#8217;ll get prompted for a commit message, so you&#8217;re unlikely to do so by accident, but still&#8230;  IMHO something as wacky as fetch should be an Hg extension so you have to explicitly enable it&#8230;.)</p>
<p>roy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy Badami</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-58742</link>
		<dc:creator>Roy Badami</dc:creator>
		<pubDate>Thu, 19 Jan 2012 21:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-58742</guid>
		<description>Oh, Hi Mark, didn&#039;t realise it was you!

I&#039;m probably being unfair in my complaint about implicit merges - all source code control systems implicitly merge into the working copy all the time.

But in source code control systems I have some familiarity with (SVN, a little Hg) the only merges that I can think of that happen without typing the command &#039;merge&#039; happen when there are uncommitted changes in the working copy, and an operation is performed that updates the working copy (and hence has to merge those changes in).  And AIUI that&#039;s not what we&#039;re talking about here.

There&#039;s also something odd going on with command naming - why is it that a pull is not the opposite of a push?  To have push and fetch be the actual direct counterparts, with pull being something different, is... unnaturual to say the least...

roy</description>
		<content:encoded><![CDATA[<p>Oh, Hi Mark, didn&#8217;t realise it was you!</p>
<p>I&#8217;m probably being unfair in my complaint about implicit merges &#8211; all source code control systems implicitly merge into the working copy all the time.</p>
<p>But in source code control systems I have some familiarity with (SVN, a little Hg) the only merges that I can think of that happen without typing the command &#8216;merge&#8217; happen when there are uncommitted changes in the working copy, and an operation is performed that updates the working copy (and hence has to merge those changes in).  And AIUI that&#8217;s not what we&#8217;re talking about here.</p>
<p>There&#8217;s also something odd going on with command naming &#8211; why is it that a pull is not the opposite of a push?  To have push and fetch be the actual direct counterparts, with pull being something different, is&#8230; unnaturual to say the least&#8230;</p>
<p>roy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-58707</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Thu, 19 Jan 2012 10:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-58707</guid>
		<description>Hi Roy - it&#039;s nice to hear from you.  You&#039;re quite right about the terminology - I&#039;ve got a blog post in mind about the most confusing terms in git, e.g. the three different senses of &quot;track&quot; - aargh!)

I hadn&#039;t realized this one before, not being familiar with Mercurial, but, indeed, &lt;a href=&quot;http://mercurial.selenic.com/wiki/GitConcepts#Command_equivalence_table&quot; rel=&quot;nofollow&quot;&gt;it seems that&lt;/a&gt; &quot;hg pull&quot; is closest to &quot;git fetch&quot;, while &quot;hg pull -u&quot; (or &quot;hg fetch&quot; - aargh again!) is closest to &quot;git pull&quot;.

With regard to explicit / implicit, I dunno.  I&#039;d probably argue that using &quot;git pull&quot; is to explicitly request a merge as well as a fetch, since the summary in its man page says &quot;Fetch from and &lt;em&gt;merge with&lt;/em&gt; another repository or a local branch&quot; (my emphasis).  However, part of the point of this blog post is that a lot of newcomers to git don&#039;t realize that you can do &quot;git fetch&quot; instead of &quot;git pull&quot; to avoid the automatic merge.

The thing that I might change in your definition of a merge to make it more &quot;git worldview&quot; is that (usually) merges in git are between two commits (and thus the state of two complete source code trees) rather than a file-by-file operation.  (I say &quot;usually&quot; because you can merge between more than two commits (octopus merges), there are subtree merges, etc. etc.)</description>
		<content:encoded><![CDATA[<p>Hi Roy &#8211; it&#8217;s nice to hear from you.  You&#8217;re quite right about the terminology &#8211; I&#8217;ve got a blog post in mind about the most confusing terms in git, e.g. the three different senses of &#8220;track&#8221; &#8211; aargh!)</p>
<p>I hadn&#8217;t realized this one before, not being familiar with Mercurial, but, indeed, <a href="http://mercurial.selenic.com/wiki/GitConcepts#Command_equivalence_table" rel="nofollow">it seems that</a> &#8220;hg pull&#8221; is closest to &#8220;git fetch&#8221;, while &#8220;hg pull -u&#8221; (or &#8220;hg fetch&#8221; &#8211; aargh again!) is closest to &#8220;git pull&#8221;.</p>
<p>With regard to explicit / implicit, I dunno.  I&#8217;d probably argue that using &#8220;git pull&#8221; is to explicitly request a merge as well as a fetch, since the summary in its man page says &#8220;Fetch from and <em>merge with</em> another repository or a local branch&#8221; (my emphasis).  However, part of the point of this blog post is that a lot of newcomers to git don&#8217;t realize that you can do &#8220;git fetch&#8221; instead of &#8220;git pull&#8221; to avoid the automatic merge.</p>
<p>The thing that I might change in your definition of a merge to make it more &#8220;git worldview&#8221; is that (usually) merges in git are between two commits (and thus the state of two complete source code trees) rather than a file-by-file operation.  (I say &#8220;usually&#8221; because you can merge between more than two commits (octopus merges), there are subtree merges, etc. etc.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy Badami</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-58684</link>
		<dc:creator>Roy Badami</dc:creator>
		<pubDate>Wed, 18 Jan 2012 22:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-58684</guid>
		<description>I&#039;m still just reading about git - and I&#039;m not sure I&#039;ve got my head around it&#039;s terminology yet which (I get the impression) is deliberately and self-indulgently incompatible with the terminology of other popular version control systems, so I may be completely confused, but...

To me, a merge is when you take two different sets of edits to the same file, and try to combine the intent of the edits to produce a single resulting file.  It is a process that can in some cases be performed automatically, and in other cases is impossible without (sometimes significant) manual work.

Are you saying that a &quot;git pull&quot; (unlike an &quot;hg pull&quot;) implicitly performs a merge (in the above sense) without it being explicitly requested?  That sounds... surprising...  Either I don&#039;t get git yet, or I don&#039;t get git yet.  (Or maybe both.  Which is fine.  It took me quite a while to evn start to get Hg, too, and I&#039;m still only in the &quot;reading about&quot; phase with git.)

roy</description>
		<content:encoded><![CDATA[<p>I&#8217;m still just reading about git &#8211; and I&#8217;m not sure I&#8217;ve got my head around it&#8217;s terminology yet which (I get the impression) is deliberately and self-indulgently incompatible with the terminology of other popular version control systems, so I may be completely confused, but&#8230;</p>
<p>To me, a merge is when you take two different sets of edits to the same file, and try to combine the intent of the edits to produce a single resulting file.  It is a process that can in some cases be performed automatically, and in other cases is impossible without (sometimes significant) manual work.</p>
<p>Are you saying that a &#8220;git pull&#8221; (unlike an &#8220;hg pull&#8221;) implicitly performs a merge (in the above sense) without it being explicitly requested?  That sounds&#8230; surprising&#8230;  Either I don&#8217;t get git yet, or I don&#8217;t get git yet.  (Or maybe both.  Which is fine.  It took me quite a while to evn start to get Hg, too, and I&#8217;m still only in the &#8220;reading about&#8221; phase with git.)</p>
<p>roy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sprei</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-58374</link>
		<dc:creator>sprei</dc:creator>
		<pubDate>Sat, 14 Jan 2012 04:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-58374</guid>
		<description>excellent lesson, and lessons that can be used to help my lecture today. thank you</description>
		<content:encoded><![CDATA[<p>excellent lesson, and lessons that can be used to help my lecture today. thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-55648</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Wed, 28 Dec 2011 19:14:31 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-55648</guid>
		<description>Oops - I&#039;ve corrected that now.  Thanks for pointing out that (and that I&#039;d failed to understand the previous comment mentioning the same error...)</description>
		<content:encoded><![CDATA[<p>Oops &#8211; I&#8217;ve corrected that now.  Thanks for pointing out that (and that I&#8217;d failed to understand the previous comment mentioning the same error&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-54733</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Fri, 23 Dec 2011 10:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-54733</guid>
		<description>If I may you didn&#039;t get it: there is a typo in the article, you wrote acylic instead of acyclic (second c is forgotten :-).
Anyway great article!</description>
		<content:encoded><![CDATA[<p>If I may you didn&#8217;t get it: there is a typo in the article, you wrote acylic instead of acyclic (second c is forgotten :-).<br />
Anyway great article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 16aR</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-54147</link>
		<dc:creator>16aR</dc:creator>
		<pubDate>Mon, 19 Dec 2011 21:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-54147</guid>
		<description>Thank you for expliciting what are the differences between pull and fetch.
But I think it&#039;s still lacking the explanation that git fetch origin master will download the content of the remotely stored master branch on the origin server into your LOCALLY origin/master branch. Thus, leaving your LOCAL master branch untouched ! You can then merge/rebase the LOCALLY origin/master branch on you local master branch.
But with the examples and explanation, I figured that out. (didn&#039;t know how to handle the git svn rebase workflow)</description>
		<content:encoded><![CDATA[<p>Thank you for expliciting what are the differences between pull and fetch.<br />
But I think it&#8217;s still lacking the explanation that git fetch origin master will download the content of the remotely stored master branch on the origin server into your LOCALLY origin/master branch. Thus, leaving your LOCAL master branch untouched ! You can then merge/rebase the LOCALLY origin/master branch on you local master branch.<br />
But with the examples and explanation, I figured that out. (didn&#8217;t know how to handle the git svn rebase workflow)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter StJ</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-49707</link>
		<dc:creator>Peter StJ</dc:creator>
		<pubDate>Fri, 18 Nov 2011 14:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-49707</guid>
		<description>Good to know, I can finally understand how to use a GUI to git.</description>
		<content:encoded><![CDATA[<p>Good to know, I can finally understand how to use a GUI to git.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://longair.net/blog/2009/04/16/git-fetch-and-merge/comment-page-1/#comment-49383</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Wed, 16 Nov 2011 13:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://longair.net/blog/?p=6#comment-49383</guid>
		<description>(I&#039;ve edited your original comment and removed the two followups, which I trust is what you&#039;d want.)

Thanks for the comments.  Personally, I&#039;ve always avoided the automatic rebase feature of git, since I like to decide just before pushing whether to rebase or keep any merge commits there - there&#039;s nothing to stop one from pulling normally and rebasing later, after all.</description>
		<content:encoded><![CDATA[<p>(I&#8217;ve edited your original comment and removed the two followups, which I trust is what you&#8217;d want.)</p>
<p>Thanks for the comments.  Personally, I&#8217;ve always avoided the automatic rebase feature of git, since I like to decide just before pushing whether to rebase or keep any merge commits there &#8211; there&#8217;s nothing to stop one from pulling normally and rebasing later, after all.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

