So I have a project "NewProject" that needs the same submodules than another project "OldProject".
Since I don't want to manually do the following manipulation in NewProject
git submodule add git@gitlab.me:my-submodule.git
I hope that there is a way to re-use the .gitmodules
file from OldProject
Here is what I tried for the moment:
cp OldProject/.gitmodules NewProject/.gitmodules
-> ok (wouaw)git submodule init
-> nothinggit submodule update
-> nothinggit submodule update --init
-> nothinggit submodule sync
-> nothinggit submodule update --init --recursive
-> nothing
I've seen countless problems of people trying to change the url (or the name) of their submodule(s) but I don't think that this is similar, the new factor being that the NewProject git repository is vanilla (have no .git/modules
).
So do you think there is a way to do what I intend to ?
and if yes, how can I achieve that?