I have this project structure:
root
|
+-- SHARE
+-- Project1
+-- Project2
+-- Project3
All projects reference the project SHARE.
So I created 4 repos one in each folder. Then I tried to add SHARE as a submodule to Project1, but I don't get what I want, because Git copied all source files from SHARE to Project1\SHARE. I wan't the submodule SHARE to checkout the files to the folder SHARE, which is parallel to Project1.
Is it possible to reference SHARE as a submodule for Project1 without copying the source files from SHARE? Or is there a better way to tell the repo for Project1 that it depends on repo SHARE?
I'm using Windows7 with VS2010 and Git Extensions.
The point of submodules is that the version of the main repository determines the version of a submodule. If you don't need this feature, you probably do not need to mess with submodules at all.
Now, if this feature is desired, then your structure doesn't make sense, as different Projects might need different versions of SHARE. That's why it is suggested that SHARE is copied into every repository, so they do not clash trying to get versions of SHARE they want.