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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.