<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: git code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 12 Oct 2008 19:27:06 GMT</pubDate>
    <description>DZone Snippets: git code</description>
    <item>
      <title>Checkout a Git clone of an SVN repository in parent folder</title>
      <link>http://snippets.dzone.com/posts/show/4813</link>
      <description>Here is a quick executable cmd that you run inside a folder checked out with Subversion. It will clone the repository using Git into the parent folder as &amp;lt;projname&amp;gt;.git&lt;br /&gt;&lt;br /&gt;Stick this code into ~/bin/gitify and add ~/bin to your path:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/bin/env ruby -wKU&lt;br /&gt;&lt;br /&gt;# get svn info location&lt;br /&gt;svnurl = `svn info | grep "^URL:"`.gsub('URL: ','').chomp&lt;br /&gt;&lt;br /&gt;# project = basename&lt;br /&gt;project = File.basename(Dir.pwd)&lt;br /&gt;&lt;br /&gt;puts cmd = "git-svn clone #{svnurl} ../#{project}.git"&lt;br /&gt;&lt;br /&gt;`#{cmd}`&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 22 Nov 2007 22:35:30 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4813</guid>
      <author>nicwilliams (Dr Nic Williams)</author>
    </item>
  </channel>
</rss>
