How do I create nested repositories in GitHub?

I am able to create a repository via (say repo) and have:

How do I create another repository (say sub_repo) placed under repo and expectedly have:
  • Efficient retrieval of releases that contain a commit
  • Best way to change android repository versions efficiently once downloaded using repo/git
  • How do I remove an author from a git repository?
  • Git repository corrupt (incorrect header check; loose object is corrupt)
  • `git commit -v` by default
  • How to push to git on EC2
  • 2 responses to “How do I create nested repositories in GitHub?”

      max630 said:

      GitHub does not allow nested repositories (IIRC Git doesn’t allow this for bare repositories).

      However, you can use submodules to nest repositories on the “client side” in the working tree.

      You need to clone the parent directory.

      Then, add the sub-repository as a submodule:

      git submodule add

      The sub_repo module will then be linked to the parent repo and can be found in the sub_repo directory.

      Commit (.gitmodules and sub_repo), push and you’re done.

      MrTux said:

      github does not support nesting repositories. If you don’t want to have absolute urls for submodules the custom is to place them next to super-repository and use “../” in urls, like here:

    Git Baby is a git and github fan, let's start git clone.