1

I'd like to use git-svn in my company for certain project "proj1".

However our repository looks like this:

proj1/
  app1/
    component1/
      branches/
      tags/
      trunk/
    component2/
      branches/
      tags/
      trunk/
  app2/
    component22/
      branches/
      tags/
      trunk/

How would you cope with this?

I thought git submodules is the answer but I don't know much about it and from googling it seems it isn't supported by git-svn.

Thank you.

EDIT: This question is related Svn -> git migration with several trunk/branches/tags. There is no correct answer though. The highest ranked one expects that there are few"sub-repositories". However in our project there are a lot of them.

Community
  • 1
  • 1
woky
  • 4,232
  • 9
  • 32
  • 41

1 Answers1

2

The usual practice is to associate a component (a coherent set of files with its own development lifecycle) to a git repo.
That means you can make several git-svn clone, each one with a SVN address referencing a distinct component.

From there, you can reference those various repos within a single parent repo as submodules if you want.
But the idea remains: once you are within one of those submodules, you are actually within a git repo: that repo will support git-svn dcommit operations.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • Hi. Thanks for answer. Do you know about any script that can automate it (eg. walk through SVN repository, detect "sub-repos", doing "git svn clone" and adding submodule) ? – woky Oct 19 '11 at 06:49
  • @woky no, because a directory in SVN can represent... anything (tag, branch, app, component, module, ...). In your case, a component is a directory with `branches`, `tag` and `trunk` within it, so it shouldn't be too hard to script. – VonC Oct 19 '11 at 07:00