Git svn clone does not check all directories

I have a project in SVN and I tried to clone it using git-svn. I followed suit in git-svn docs .

git svn clone svn+ssh://host/path/trunk project_name 

The command completed without an msg error message, but the cloned project does not contain all directories as a project in SVN.

At the top level, my SVN project has ...

 $ svn ls svn+ssh://host/path/trunk README Rakefile app/ config/ db/ doc/ lib/ log/ public/ script/ test/ tmp/ vendor/ 

After cloning locally, I have ...

 README Rakefile app config doc public script test 

There are also no sub-dirs.


UPDATE

Experimentally cloned another project on the same host. It seemed to be working fine. What is so special about this? I can't think of anything except that I just created it and imported it to SVN before cloning. Will it make a difference?


I tried to create a completely new project by importing it into SVN and cloning. Got the same result, the same missing drives.

+4
source share
3 answers

As far as I can tell, git does not track empty directories:

http://git.or.cz/gitwiki/GitFaq#CanIaddemptydirectories.3F :

That is, directories should never be added to the repository and are not tracked by themselves.

It makes sense? Are missing directories missing?
+11
source

Are you sure your SVN is not using any svn: external (see comments)?
Read more about this process in the article "transition from svn to git"

svn-git really should somehow warn you that it does not support external selections. I found out by noticing that svn log did not have checks for these files, and then saw when I did a clean svn checkout , which it extracted externals for the vendor / plugins directory.

So, I decided to just modify the suppliers / plugins directory, separate the external link, and switch to git submodules as I upgrade.
What I really wanted to do, but did not see how to do it, was to refer to the plugin code as an http URL and save it as a submodule so that I had a convenient link to the source location and version

+1
source

You can try

svn2git

or

 git svn clone svn+ssh://host/path project_name --trunk=trunk/* 

There is some form of deep cloning in git 1.6+, but I'm not sure if this is the correct syntax

+1
source

All Articles