Let's say I have a repository test:
test.git
src/
hello/
awesome.c
nice/
cool.c
fun.c
.gitignore
README.md
I would like to add src/hello/ to another repository (exactly like a submodule but not the main path (/src/hello/ instead of /)
test2.git
ok/
hello/ (submodule - links to test/src/hello)
awesome.c
.gitmodules
.gitignore
Something like: (test2 git shell)
$ git submodule add https://github.com/username/test/src/hello