[jboss-dev] Porting SVN Projects to Git

Kabir Khan kabir.khan at jboss.com
Thu Jul 15 12:40:02 EDT 2010


Is there any way to filter what gets downloaded? I really don't care what branches were created 4 years ago for a project, but I do mind waiting
On 15 Jul 2010, at 00:23, Emmanuel Bernard wrote:

> Here is my version of it
> http://blog.emmanuelbernard.com/2010/05/git-how-my-life-has-improved-since-last-month-when-i-used-svn/
> 
> Note that I do not use any special script
> 
> On 14 juil. 2010, at 19:34, Galder Zamarreño <galder at jboss.org> wrote:
> 
>> U should blog/twiiter about this :)
>> 
>> On Jul 14, 2010, at 6:40 PM, Andrew Lee Rubinger wrote:
>> 
>>> Today I look a relatively simple project and migrated it from SVN to 
>>> Git.  There's a bunch of resources scattered about involving the "best" 
>>> way to do this, but thought I'd share my experience as it appears to 
>>> have been a success.  If anyone's got a better process I'm interested, too.
>>> 
>>> Note: I'm on Fedora13, so some commands here are gonna be env-specific.
>>> 
>>> # Obtain dependencies which run or are run from the svn2git Ruby script
>>> $> sudo yum -y install git-core git-svn ruby rubygems
>>> (Original instructions used apt-get, so I assume Debianey/Ubuntooey 
>>> distros support this command too)
>>> 
>>> # Install the svn2git gem (script)
>>> $> sudo gem install svn2git --source http://gemcutter.org
>>> 
>>> # Make a new directory to contain your new local Git repo and switch into it
>>> $> mkdir jboss-ejb3-async; cd jboss-ejb3-async
>>> 
>>> # (Optional) Create a mapping file from SVN usernames to Git Authors
>>> $> svn log | grep -E "r[0-9]+ \| [a-z]+ \|" | awk '{print $3}' | sort | 
>>> uniq # Prints out all authors for the current SVN working copy
>>> File format should be:
>>> SVNUsername = Full Name <email.address.org>
>>> ALRubinger = Andrew Lee Rubinger <alr at jboss.org>
>>> 
>>> # Use svn2git to extract out the SVN commit information, passing along 
>>> parameters to note trunk, tags, branches locations
>>> $> svn2git https://svn.jboss.org/repos/jbossas/ --trunk 
>>> projects/ejb3/components/async/trunk --tags 
>>> projects/ejb3/components/async/tags --nobranches --authors ../authors.txt
>>> (More info on the switches at: http://github.com/nirvdrum/svn2git)
>>> 
>>> # Create a remote repo somewhere (I did GitHub and used the web console 
>>> for that)
>>> 
>>> # Add a remote "origin" to the local repo so we can push to it
>>> $> git remote add origin git at github.com:ALRubinger/jboss-ejb3-async.git
>>> 
>>> # Push all contents including the tags to the origin at branch master
>>> $> git push --tags origin master
>>> 
>>> S,
>>> ALR
>>> _______________________________________________
>>> jboss-development mailing list
>>> jboss-development at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>> 
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>> 
>> 
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
> 
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development




More information about the jboss-development mailing list