Over a million developers have joined DZone.

Checkout A Git Clone Of An SVN Repository In Parent Folder

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 <projname>.git

Stick this code into ~/bin/gitify and add ~/bin to your path:

#!/usr/bin/env ruby -wKU

# get svn info location
svnurl = `svn info | grep "^URL:"`.gsub('URL: ','').chomp

# project = basename
project = File.basename(Dir.pwd)

puts cmd = "git-svn clone #{svnurl} ../#{project}.git"


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}