Sudar
Sudar

Reputation: 20030

svn to git - Import only trunk with full history

I am currently migrating my WordPress Plugins from SVN to git using git-svn by issuing the following commands

git svn clone -r12345 -A AUTHORS_FILE --no-minimize-url --username=SVN_USERNAME http://plugins.svn.wordpress.org/posts-by-tag
git svn fetch

It is working, but the problem is that it is very slow because the repo is huge and I have lot of tags. git-svn tries to retrieve all the tags and it is taking very long (around 3-4 hours for 15-20 tags)

I don't need the tags and I am not going to commit back to svn using git-svn. So I am trying to see if it would possible to retrieve only the trunk (leaving the tags and branches) but with full history?

Upvotes: 2

Views: 863

Answers (2)

knittl
knittl

Reputation: 265928

Simply specify /trunk as the top-level directory:

git svn clone -r12345 -A AUTHORS_FILE --no-minimize-url --username=SVN_USERNAME \
  http://plugins.svn.wordpress.org/posts-by-tag/trunk

Upvotes: 1

tschaible
tschaible

Reputation: 7695

Try the --ignore-paths parameter as documented here

Upvotes: 0

Related Questions