<?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: Dual Master Git Repositories</title>
	<atom:link href="http://allmybrain.com/2009/11/17/dual-master-git-repositories/feed/" rel="self" type="application/rss+xml" />
	<link>http://allmybrain.com/2009/11/17/dual-master-git-repositories/</link>
	<description>Where stuff from my brain lands</description>
	<lastBuildDate>Sat, 05 May 2012 12:28:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Dennis</title>
		<link>http://allmybrain.com/2009/11/17/dual-master-git-repositories/comment-page-1/#comment-977</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Wed, 18 Nov 2009 17:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://allmybrain.com/?p=330#comment-977</guid>
		<description>The cool thing is, you can really do about whatever you want.  We use bare server repos all the time.  Sometimes, I work on a couple machines, but I don&#039;t want to push to the server repo (not ready for co-workers to get the updates etc).  I can push back and forth between my machines, edit until I like things, then finally push to the server.  I could also share some changes with a co-worker, but not push to the server.  When I finally push and he pulls, git is smart enough to not have a single issue.  git isn&#039;t perfect but it sure beats older scm technology.</description>
		<content:encoded><![CDATA[<p>The cool thing is, you can really do about whatever you want.  We use bare server repos all the time.  Sometimes, I work on a couple machines, but I don&#8217;t want to push to the server repo (not ready for co-workers to get the updates etc).  I can push back and forth between my machines, edit until I like things, then finally push to the server.  I could also share some changes with a co-worker, but not push to the server.  When I finally push and he pulls, git is smart enough to not have a single issue.  git isn&#8217;t perfect but it sure beats older scm technology.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Fugal</title>
		<link>http://allmybrain.com/2009/11/17/dual-master-git-repositories/comment-page-1/#comment-976</link>
		<dc:creator>Hans Fugal</dc:creator>
		<pubDate>Wed, 18 Nov 2009 17:51:06 +0000</pubDate>
		<guid isPermaLink="false">http://allmybrain.com/?p=330#comment-976</guid>
		<description>A better way is to have a bare &quot;hub&quot; repository that you push/pull from each repository. But I admit that I do something similar to you, but I have settled on a pattern that&#039;s a bit more predictable and easier to recover from when i screw it up:

I set up the repo on &quot;server&quot;, then clone it on &quot;laptop&quot;. Then I edit .git/config on laptop and add this line to the remote (named origin by default):

[remote &quot;origin&quot;]
        ...
        push = +refs/heads/*:refs/remotes/laptop/*

Then when I do git push everything is pushed but no HEAD is changed and no working directory is messed up. Then on server I do git merge laptop. You can also work with multiple branches, etc. 

Likewise when you git fetch server, you have the freedom to merge or rebase or whatever you want to do explicitly on the server&#039;s status. Or you can git pull of course.

The only thing to watch for is occasionally you&#039;ll want to do a git remote prune to clean up the old branches that you deleted but whose deletion didn&#039;t get propagated.</description>
		<content:encoded><![CDATA[<p>A better way is to have a bare &#8220;hub&#8221; repository that you push/pull from each repository. But I admit that I do something similar to you, but I have settled on a pattern that&#8217;s a bit more predictable and easier to recover from when i screw it up:</p>
<p>I set up the repo on &#8220;server&#8221;, then clone it on &#8220;laptop&#8221;. Then I edit .git/config on laptop and add this line to the remote (named origin by default):</p>
<p>[remote "origin"]<br />
        &#8230;<br />
        push = +refs/heads/*:refs/remotes/laptop/*</p>
<p>Then when I do git push everything is pushed but no HEAD is changed and no working directory is messed up. Then on server I do git merge laptop. You can also work with multiple branches, etc. </p>
<p>Likewise when you git fetch server, you have the freedom to merge or rebase or whatever you want to do explicitly on the server&#8217;s status. Or you can git pull of course.</p>
<p>The only thing to watch for is occasionally you&#8217;ll want to do a git remote prune to clean up the old branches that you deleted but whose deletion didn&#8217;t get propagated.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

