git submodule svn external

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-05-21T03:35:31Z Indexed on 2010/05/21 3:40 UTC
Read the original article Hit count: 193

Filed under:
|
|

Let's say I have 3 git repositories, each with a lib and tests folder in the root. All 3 repositories are part of what I want to be a single package, however it is important to me to keep the repositories separate.

I am new to git coming from svn, so I have been reading up on submodules and how they differ from svn:externals. In SVN I could have a single

lib/vendor/package

directory, and inside package I could setup 3 externals pointing to each of my 3 repositories lib directory, renaming it appropriately like

lib/vendor/package/a  -> repo1/lib
lib/vendor/package/b  -> repo2/lib
lib/vendor/package/c  -> repo3/lib

but from my understanding this is not possible with git. Am I missing something?

Really I'm hoping this can be solved in one of two ways.

  1. Someone will point out how to create a 4th git repository which has the other 3 as submodules organized as I have mentioned above (where I can have an a, b, and c folder inside the root)
  2. Someone will point out how to set this up using svn:externals in combination with githubs svn support, referencing the lib directory within each git repository (from my understanding this is impossible)

© Stack Overflow or respective owner

Related posts about svn

Related posts about git