git - How do I create nested repositories in GitHub? -
i able create repository via https://github.com/ (say repo
) , have:
https://github.com/username/repo.git
how create repository (say sub_repo
) placed under repo
, expectedly have:
https://github.com/username/repo/sub_repo.git
github not allow nested repositories (iirc git doesn't allow bare repositories).
however, can use submodules nest repositories on "client side" in working tree.
you need clone parent directory.
then, add sub-repository submodule:
git submodule add https://github.com/username/sub_repo.git
the sub_repo module linked parent repo , can found in sub_repo directory.
commit (.gitmodules , sub_repo), push , you're done.
Comments
Post a Comment