git reference common directory/repo
Posted
by phillee
on Stack Overflow
See other posts from Stack Overflow
or by phillee
Published on 2010-04-19T07:17:26Z
Indexed on
2010/04/19
7:23 UTC
Read the original article
Hit count: 306
Project layout:
/project_a
/shared
/project_b
/shared
/shared
project_a and project_b both need to contain the shared folder. With svn, we used svn:externalsand that worked fine, since svn can reference subdirs (with relative paths too). However, we moved to git and it seems to not support checking out subdirs.
Our solution now is to put project_a, project_b and shared all in different git repos, and use git submodules in project_a and project_b. However this seems much more complicated than one monolithic svn repo with svn:externals. What's the correct way to handle common elements in git?
© Stack Overflow or respective owner