1

I have a Subversion repository with the following folder structure:

projectname
projectname/api
projectname/services/service1
projectname/services/service2
projectname/webapps/app1
projectname/webapps/app2

Using Subversion I can checkout all or individual repositories. I have converted the root repository to a git repository. Now I am not able to clone individual project e.g. "projectname/webapps/app1".

Is there anything I missed during migration? Is there any git svn command that converts a Subversion repository to a Git repository and creates submodules from inner svn repositories?

Micha Wiedenmann
  • 19,979
  • 21
  • 92
  • 137

1 Answers1

0

Assuming you want transforme app1 in a git repo. And app1 has the follow directory

trunk, branches, tags

git svn init --prefix=svn/ --username='user' --no-metadata --no-minimize-url --trunk='trunk' --tags='tags' --branches='branches' http://svnserver/projectname/webapps/app1

--trunk='trunk' --tags='tags' --branches='branches' do the trick to transform everything inside branches to git branches, trunk to master and tags folders to git tags.

--no-minimize-url will consider only http://svnserver/projectname/webapps/app1 and not http://svnserver/projectname/ (the root of your repo).

Git svn docs

svn2git, nice tool to convert one to another.

Joao Vitorino
  • 2,976
  • 3
  • 26
  • 55