I have two local projects which I manage with git, one being dependent on the other – like this:
project A/
├── project B/     
│   ├── file B₁
│   ├── file B₂
│   ├── …
It makes sense to me to have project B as a git submodule of project A.
Now, I have set up a remote bare repository for project A for backup and sharing purposes. Of course, I want the remote repository to contain all of project B, including its files (file B₁, file B₂, …). But git push and git push --recurse-submodules=on-demand don’t achieve this. Whenever I list the files in my remote repository by git ls-tree -r HEAD, only the files of project A itself are listed. This does make sense to me.
However, is there a way to push the entire submodule project B to my remote base repository somehow, preferably in a clean way?
 
     
     
    