<?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>Fri, 27 Jan 2012 12:15:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</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="" />]]></content:encoded>
			<wfw:commentRss>http://www.innovationontherun.com/the-power-of-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

