<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Innovation On The Run &#187; subversion</title>
	<atom:link href="http://www.innovationontherun.com/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.innovationontherun.com</link>
	<description>Ruminations about innovation and software by Rob Di Marco</description>
	<lastBuildDate>Sun, 25 Oct 2009 14:44:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The Power of GIT</title>
		<link>http://www.innovationontherun.com/the-power-of-git/</link>
		<comments>http://www.innovationontherun.com/the-power-of-git/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 23:10:20 +0000</pubDate>
		<dc:creator>Rob Di Marco</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.innovationontherun.com/?p=46</guid>
		<description><![CDATA[Started working with git for the first time last week and I am really impressed at how powerful the tool is.&#160; I&#8217;ve been interested in using a distributed version control system like git, darcs, or mercurial for a while, but I have been turned off on actually making the move because of the lack of [...]]]></description>
			<content:encoded><![CDATA[<p>Started working with git for the first time last week and I am really impressed at how powerful the tool is.&nbsp; I&#8217;ve been interested in using a distributed version control system like git, darcs, or mercurial for a while, but I have been turned off on actually making the move because of the lack of integration with these version control systems and other software (bug tracking, automated build software, etc.).&nbsp; Also, as a manager, I did not want to have to retrain a whole team of developers on a new version control system.</p>
<p>But enter <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn</a> which allows me to use git locally and Subversion for the distributed repository.&nbsp; So now I get the best of both worlds, I can make my local branches and commits, but I don&#8217;t have to retrain my team or worry about integration as we still have all of the Subversion interfaces for interacting with the repository.</p>
<p>Using git-svn is pretty simple.&nbsp; I had to install on CentOS, Max OS X, and Ubuntu and git was available through yum/apt-get/Macports.&nbsp; To check out was just:</p>
<p><span class="Code">git svn clone http://svn.automattic.com/wordpress/ -ttags -bbranches -Ttrunk</span></p>
<p>This command will check out all revisions from Subversion and keep a copy of this locally.&nbsp; Because we download a copy for all revisions, it can take a long time to do this initial setup.</p>
<p>As for the -t/-T/-b, this is used by git-svn to associate SVN branches with git branches.&nbsp; This configures your git master branch to correspond with the wordpress trunk, but also gives you a git branch for each SVN branch if you want your changes to be tied to a branch rather than the trunk.</p>
<p>One the clone completes, I can use all of the git tools to my heart&#8217;s content.&nbsp; Local checkins, branches, easy merges, etc.&nbsp; If I need to refresh from Subversion, git will get all new changes from SVN, then replay my edits on top of it.</p>
<p>Committing changes back (assuming that you have permission) just requires:</p>
<p><span class="Code">git svn dcommit </span></p>
<p>All of your changes are now committed one at a time to the SVN repository.&nbsp; Very simple for me to get set up and run with.</p>
<h1>Digging Deeper&#8230;</h1>
<p>As I started using git more, I realized how perfect it is for another big problem that I have, managing production configurations.&nbsp; For example, I have a common problem when managing Apache configurations.&nbsp; I have the following needs:</p>
<ul>
<li>I use multiple conf files to manage my Apache installation (main httpd.conf, virtual host, SSL, etc.)</li>
<li>I want basic version control over the files to track changes over time</li>
<li>When trying to debug a problem, I often have to go into the files and tweak multiple debug settings (LogLevel, RewriteLogLevel, etc.).</li>
</ul>
<p>&nbsp;What git does for me is lets me do is to create a branch that just contains my debug changes and lets me easily merge the master branch in with these changes.&nbsp; To do this, I create a debug branch that contains all of my changes needed</p>
<p><span class="Code">git branch debug</span></p>
<p><span class="Code">git checkout -b debug</span></p>
<p>..make changes&#8230;</p>
<p><span class="Code">git commit</span></p>
<p><span class="Code">git checkout -b master</span></p>
<p>&#8230; debug is now off&#8230;</p>
<p>.. Make changes and commit back to master&#8230;</p>
<p><span class="Code">git commit</span></p>
<p>&nbsp;..Now when I need to debug again</p>
<p><span class="Code">git checkout -b debug &amp;&amp; git merge master</span></p>
<p>The merge command will sync the debug branch with the master branch and then will REPLAY the changes that I made to turn on debugging.&nbsp; When I finish I can turn off my debugging by</p>
<p><span class="Code">git checkout -b master</span></p>
<p>&nbsp;I see using this not just to manage logging but in other configuration management problems like:</p>
<ul>
<li>Managing database connection information</li>
<li>Configuring network arrangements</li>
</ul>
<img src="http://www.innovationontherun.com/?ak_action=api_record_view&id=46&type=feed" alt="" /><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d46').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d46" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=The+Power+of+GIT&amp;url=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.squidoo.com/lensmaster/bookmark?http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F" rel="nofollow" title="Add to&nbsp;Squidoo"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/squidoo.png" title="Add to&nbsp;Squidoo" alt="Add to&nbsp;Squidoo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F&amp;title=The+Power+of+GIT" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.innovationontherun.com%2Fthe-power-of-git%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.innovationontherun.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d46').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d46').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.innovationontherun.com/the-power-of-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
