Git downloading trunk using subversion bridge

I am using the git to subversion bridge to check out a subversion repository. Initially I was using this command,

get svn clone -s svn://repositoryName/etc

But our subversion repository is massive, many years of development, many branches, etc.

The consequence is that the process dies often, when it is compressing the repository the memory usage goes above 1.5 GB, and it dies.

So I thought perhaps I would try and just check out the trunk because that is what I am going to be using mostly. So I tried this,

get svn clone -trunk svn://repositoryName/etc

But I get an error, Use of uninitialized value in pattern match.

Can someone please tell me the correct command to use for checking out the trunk only. Also is there a known bug / memory leak? I am using Git version 1.7.3.1-preview20201002 on windows.

Is there any official documentation for git and the command line options?

Answers


This should work:

git svn clone svn://repositoryName/whatever/trunk

The --trunk option isn't what you're looking for. It's a way to specify the name of the directory that's typically called "trunk". For example, if your svn repository used "/main" for primary development, "/releases" instead of "/tags" and "/other" instead of "/branches", you could use this instead of the -s (--standard) option:

git clone --trunk=main --tags=releases --branches=other svn://repositoryName/whatever

However, a better option may be to clone the repository starting at a particular svn revision number:

git svn clone -r 20000 svn://repositoryName/whatever
cd whatever
git svn rebase

clone -r 20000 will clone only svn revision number 20000. git svn rebase will then fetch and apply all revisions after 20000, so you'll be left with a git repository that has a history beginning at revision 20000.

The man pages are the best place to go for documentation. If you don't have them installed, kernal.org's copy is nicely formatted: http://www.kernel.org/pub/software/scm/git/docs/. A google search for "man git svn" will bring up the relevant page quickly.


Need Your Help


About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.