I have a project in SVN and I tried to clone it with git-svn. I followed the example in the git-svn docs.
git svn clone svn+ssh://host/path/trunk project_name
The command completed with no error msg, but the cloned project does not contain all the directories as the 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 subdirs missing.
UPDATE
Experimentally cloned another project on same host. Seemed to work fine. What's special about this one? Nothing I can think of except that I just created it and imported it into SVN before cloning. Would that make a difference?
Tried creating a completely new project, importing to SVN and cloning. Got same result, same missing dirs.
As far as I can tell, git doesn't tracks empty directories:
http://git.or.cz/gitwiki/GitFaq#CanIaddemptydirectories.3F:
That is, directories never have to be added to the repository, and are not tracked on their own.
Does this make sense? Are the missing directories empty?
Are you sure your SVN is not using some svn:external (see comments)?
More details on that process in the article "moving from svn to git"
svn-git
really ought to warn you somehow that it doesn’t support fetching externals.
This I learned by noticing that thesvn log
had no checkins of those files and then saw when I did a cleansvn checkout
that it was fetching externals for the vendor/plugins directory.So, I decided to just pull in the vendor/plugins directory verbatim, detaching the external reference, and move to git submodules as we upgrade.
What I really wanted to do, but didn’t see how to, was to reference the plugin code as an http URL and keep as a submodule, so that I would have a handy reference to source location and revision
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With