There is a big project with lots of directories. And it was agreed that the portion of the directory to highlight in different
submodule
to put on
github
each in its own separate repository. But I would not want anything to move or copy.
But in all the examples is written how to create
submodule
existing repository
github
for example:
git submodule add git@github.com:test test
But it is not clear how to do the opposite, to create from already existing folders
submodule
.
This option gives the error:
mkdir test
git submodule add ./test
А насколько я понимаю так не совсем правильно:
mkdir test
git init test
git submodule add ./test
Ну и как тогда при таком варианте сказать
git
что именно этот
submodule
отправлять в нужный репозиторий совсем не понятно.