I want to mimic behavior like svn:externals: I have a master project and I have some "common" code in another repository. With SVN I would do:
svn co <url>/src common
and my folder structure would be:
repo/common/*.cpp
Now with git + submodule + sparse checkout this is a lot more complicated and I have an extra subdirectory layer when I add the submodule;
git submodule add <url> common
now my folder structure is:
repo/common/src/*.cpp
repo/common/lib/...
with sparse checkout I can make sure only to checkout the src folder, but than I still have one more layer (src) compared to the svn:externals solution:
repo/common/src/*.cpp
is there a better solution for common code? Or a way to clean this up? I know that everything will be working; it's just not so clean...