My project has the following modules.
1. Controller
2. Models
3. Views
4. Interface
5. Settings
I want to have a central repo
which is defined as bare
and one updater repo
and from the updater repo, will let others to clone their projects.
First I created a temp directory in the name of modules
and copied my project folders and set up git
for all the project folders.
.
├── modules
| ├── controller/.git
| └── models/.git
| ├── views/.git
| └── interface/.git
| └── settings/.git
I then created a folder called my_updater
and init git to this folder.
Then I added the above git
projects into as submodule of the updater folder.
for example,
git submodule add ../module/controller controller
git submodule add ../module/interface interface
then in my_updater
folder, I added the submodules and committed.
git commit -m "Initial Commit"
I setup my remote path of this my_updater
folder as central_repo
as follows.
git remote add origin ../central_repo
I tried to get all the projects in my_updater
to my_workspace
folder as follows.
git clone ../my_updater my_workspace
Now when I looked into the my_workspace, all the folders of the submodule comes into that folder my_workspace
. But all the contents of the submodules folders are empty.
Why I didn't receive the submodule folders content here?