<?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: Versioning dotfiles in git</title>
	<atom:link href="http://blog.nelhage.com/2010/02/versioning-dotfiles-in-git/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nelhage.com/2010/02/versioning-dotfiles-in-git/</link>
	<description>It's software. It's made of bugs.</description>
	<lastBuildDate>Fri, 03 Feb 2012 17:48:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Aristotle Pagaltzis</title>
		<link>http://blog.nelhage.com/2010/02/versioning-dotfiles-in-git/comment-page-1/#comment-492</link>
		<dc:creator>Aristotle Pagaltzis</dc:creator>
		<pubDate>Mon, 15 Feb 2010 15:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nelhage.com/?p=134#comment-492</guid>
		<description>&lt;p&gt;You could script something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git rebase --onto master HEAD^ HEAD ;
git checkout $machine ;
git merge master
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Which you would execute after making a tweak that should happen on master. The problem is making this work atomically with respective to merge failures. I suppose you would have to keep clone &lt;code&gt;.dotfiles&lt;/code&gt; from another repository and do something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git push ;
pushd $origin_dir ;
git rebase --onto master $machine~1 $machine~0 ;
git checkout $machine ;
git merge master ;
popd ;
git fetch ;
git reset --hard $machine origin/$machine
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This would immediately convert the commit you just made into a commit on master, merged back to the machine branch.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You could script something like this:</p>

<pre><code>git rebase --onto master HEAD^ HEAD ;
git checkout $machine ;
git merge master
</code></pre>

<p>Which you would execute after making a tweak that should happen on master. The problem is making this work atomically with respective to merge failures. I suppose you would have to keep clone <code>.dotfiles</code> from another repository and do something like</p>

<pre><code>git push ;
pushd $origin_dir ;
git rebase --onto master $machine~1 $machine~0 ;
git checkout $machine ;
git merge master ;
popd ;
git fetch ;
git reset --hard $machine origin/$machine
</code></pre>

<p>This would immediately convert the commit you just made into a commit on master, merged back to the machine branch.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Anders Kaseorg</title>
		<link>http://blog.nelhage.com/2010/02/versioning-dotfiles-in-git/comment-page-1/#comment-489</link>
		<dc:creator>Anders Kaseorg</dc:creator>
		<pubDate>Mon, 15 Feb 2010 09:42:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nelhage.com/?p=134#comment-489</guid>
		<description>&lt;blockquote cite=&quot;nelhage&quot;&gt;I find the “commit and cherry-pick” workflow somewhat unfortunate, in that it results in two copies of every commit, and it makes “synchronize my dotfiles” a sufficiently expensive operation (in terms of effort) that it doesn’t happy continually.&lt;/blockquote&gt;

&lt;p&gt;Another reason it’s unfortunate is that mixing cherry-picks with merges leads to many more spurious merge conflicts than you’d get with either a pure cherry-pick workflow or a pure merge workflow.  Merging a branch containing commits A and B with a cherry-picked A′ &lt;em&gt;will&lt;/em&gt; result in a conflict if B depends on A.  (Even if you try to get around this once with merge -sours, it will come back to bite you next time you really have changes to merge in.)&lt;/p&gt;

&lt;p&gt;One way to solve this problem would be, after cherry-picking some commits onto master, to go and replace the original copies with merges of master into the machine branch.  This requires non-fast-forwards of the machine branch, but you’re probably okay with that since you’re its only user.&lt;/p&gt;

&lt;p&gt;Perhaps a better way would be to script the operation of {commit something to master and merge it to the machine branch} atomically without leaving the machine branch.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote cite="nelhage">I find the “commit and cherry-pick” workflow somewhat unfortunate, in that it results in two copies of every commit, and it makes “synchronize my dotfiles” a sufficiently expensive operation (in terms of effort) that it doesn’t happy continually.</blockquote>

<p>Another reason it’s unfortunate is that mixing cherry-picks with merges leads to many more spurious merge conflicts than you’d get with either a pure cherry-pick workflow or a pure merge workflow.  Merging a branch containing commits A and B with a cherry-picked A′ <em>will</em> result in a conflict if B depends on A.  (Even if you try to get around this once with merge -sours, it will come back to bite you next time you really have changes to merge in.)</p>

<p>One way to solve this problem would be, after cherry-picking some commits onto master, to go and replace the original copies with merges of master into the machine branch.  This requires non-fast-forwards of the machine branch, but you’re probably okay with that since you’re its only user.</p>

<p>Perhaps a better way would be to script the operation of {commit something to master and merge it to the machine branch} atomically without leaving the machine branch.</p>]]></content:encoded>
	</item>
</channel>
</rss>

