<?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>kiss the sun and walk on air &#187; git</title>
	<atom:link href="http://osi.fotap.org/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://osi.fotap.org</link>
	<description>my thoughts and my life. yes, another blog on the internet. who would have thought.</description>
	<lastBuildDate>Tue, 18 Aug 2009 01:32:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>adding a prefix to git svn repositories</title>
		<link>http://osi.fotap.org/2009/01/07/adding-a-prefix-to-git-svn-repositories/</link>
		<comments>http://osi.fotap.org/2009/01/07/adding-a-prefix-to-git-svn-repositories/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 19:06:24 +0000</pubDate>
		<dc:creator>osi</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://osi.fotap.org/?p=85</guid>
		<description><![CDATA[i finally took the plunge and started using git to manage my code. since we use subversion at work, i&#8217;m using git-svn to collaborate with them.
initially, i just followed the simple starting instructions, which don&#8217;t use the &#8211;prefix option to git svn init.
it wasn&#8217;t long before i saw someone&#8217;s suggestion to add a svn prefix [...]]]></description>
			<content:encoded><![CDATA[<p>i finally took the plunge and started using git to manage my code. since we use subversion at work, i&#8217;m using git-svn to collaborate with them.</p>
<p>initially, i just followed the simple starting instructions, which don&#8217;t use the <em>&#8211;prefix</em> option to <code>git svn init</code>.</p>
<p>it wasn&#8217;t long before i saw someone&#8217;s suggestion to add a <strong>svn</strong> prefix to the remote branch names.. as a way of segregating the namespace, and to easily allow me to have local branches that have the same name.</p>
<p>i searched around, but there weren&#8217;t any explicit instructions on how to add the prefix post-init. well, you can. here&#8217;s how.</p>
<p>in your <em>.git/config</em>, there will be a block for the SVN configuration:</p>
<blockquote>
<pre>
[svn-remote "svn"]
	url = http://example.com/your/repo/root
	fetch = trunk:refs/remotes<strong>/svn</strong>/trunk
	branches = branches/*:refs/remotes<strong>/svn</strong>/*
	tags = tags/*:refs/remotes<strong>/svn</strong>/tags/*
</pre>
</blockquote>
<p>what you will want to do is edit this file and add the <strong>/svn</strong> entries that i have in bold.</p>
<p>then, re-run <code>git svn fetch</code>. this will populate the new branches. thanks to the metadata git-svn keeps, its aware that there are already local commits that correspond to specific SVN revisions.</p>
<p>finally, you can delete all of the old branches using something like <code>git branch -d -r | grep -v svn | xargs -n 1 git branch -d -r</code></p>
<p>then sit back and bask in your new prefixed life <img src='http://osi.fotap.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://osi.fotap.org/2009/01/07/adding-a-prefix-to-git-svn-repositories/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
