[jboss-dev] Porting SVN Projects to Git
Kabir Khan
kabir.khan at jboss.com
Fri Jul 16 09:59:27 EDT 2010
$git config --global core.autocrlf false
seems to work
On 16 Jul 2010, at 13:50, Kabir Khan wrote:
> What to do about line endings (I'm on OS X)?
>
> git init ; git fetch kernel I originally got something like:
>
> [kabir ~/temp/git/kernel]
> $touch test
>
> [kabir ~/temp/git/kernel]
> $git add test
>
> [kabir ~/temp/git/kernel]
> $git stash
> warning: CRLF will be replaced by LF in kernel/src/test/java/org/jboss/test/kernel/config/test/PropertyReplaceAnnotationTestCase.java.
> warning: CRLF will be replaced by LF in kernel/src/test/java/org/jboss/test/kernel/config/test/PropertyReplaceTestCase.java.
> <hundreds of files>
>
> I then deleted everything and
> $git config --global core.autocrlf input
> and git init ; git fetch kernel again
>
> Now I get
> $git svn rebase
> kernel/src/test/java/org/jboss/test/kernel/deployment/xml/test/AbstractMCTest.java: needs update
> kernel/src/test/java/org/jboss/test/kernel/deployment/xml/test/AbstractPolicyTest.java: needs update
> <hundreds of files>
>
>
> 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
>
>
> _______________________________________________
> 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