How do I create nested repositories in GitHub?

SparkAndShine

I am able to create a repository via https://github.com/ (say repo) and have:

https://github.com/username/repo.git

How do I create another repository (say sub_repo) placed under repo and expectedly have:

https://github.com/username/repo/sub_repo.git
MrTux

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 https://github.com/username/sub_repo.git

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

GitHub - how can I create sub repositories?

From Dev

How do I merge between multiple forked repositories on GitHub?

From Dev

How do I search GitHub API repositories with unauthorized access?

From Dev

Emacs / Magit -- how to create and delete repositories on Github

From Dev

Emacs / Magit -- how to create and delete repositories on Github

From Java

How do I create a folder in a GitHub repository?

From Dev

How do i switch between different users(github accounts) when pushing repositories?

From Dev

How do I exclude Repositories in Spring tests?

From Dev

How do I restore the default repositories?

From Dev

How do I exclude Repositories in Spring tests?

From Dev

How do I enable the source code repositories?

From Dev

How do GitHub and BitBucket parse the git repositories that they host?

From Dev

How can I list all the repositories of a Github Organization by URL?

From Java

How do I create some kind of table of content in GitHub wiki?

From Dev

How do I create more than a hello world with GitHub Pages?

From Dev

How do I create new github repository using Visual Studio?

From Dev

How do I create my own Github badge?

From Dev

Angular 2 How do I create a nested structure?

From Dev

How do I create nested aggregations with count on MongoDB?

From Dev

How do I create a nested array from current array?

From Dev

How do I create an Oracle table of objects containing nested tables?

From Dev

How do I create an unlimited nested sortable list?

From Dev

How do I create a fully dynamic nested vector?

From Dev

How do I create a nested list using XSL transformation

From Dev

UI router - How do i create a nested state

From Dev

How to delete Repositories contributed to on github?

From Dev

How can I create bare repositories in atlassion-stash

From Dev

How do repositories work?

From Dev

How do I recursively remove temporary files containing ~ in git repositories

Related Related

  1. 1

    GitHub - how can I create sub repositories?

  2. 2

    How do I merge between multiple forked repositories on GitHub?

  3. 3

    How do I search GitHub API repositories with unauthorized access?

  4. 4

    Emacs / Magit -- how to create and delete repositories on Github

  5. 5

    Emacs / Magit -- how to create and delete repositories on Github

  6. 6

    How do I create a folder in a GitHub repository?

  7. 7

    How do i switch between different users(github accounts) when pushing repositories?

  8. 8

    How do I exclude Repositories in Spring tests?

  9. 9

    How do I restore the default repositories?

  10. 10

    How do I exclude Repositories in Spring tests?

  11. 11

    How do I enable the source code repositories?

  12. 12

    How do GitHub and BitBucket parse the git repositories that they host?

  13. 13

    How can I list all the repositories of a Github Organization by URL?

  14. 14

    How do I create some kind of table of content in GitHub wiki?

  15. 15

    How do I create more than a hello world with GitHub Pages?

  16. 16

    How do I create new github repository using Visual Studio?

  17. 17

    How do I create my own Github badge?

  18. 18

    Angular 2 How do I create a nested structure?

  19. 19

    How do I create nested aggregations with count on MongoDB?

  20. 20

    How do I create a nested array from current array?

  21. 21

    How do I create an Oracle table of objects containing nested tables?

  22. 22

    How do I create an unlimited nested sortable list?

  23. 23

    How do I create a fully dynamic nested vector?

  24. 24

    How do I create a nested list using XSL transformation

  25. 25

    UI router - How do i create a nested state

  26. 26

    How to delete Repositories contributed to on github?

  27. 27

    How can I create bare repositories in atlassion-stash

  28. 28

    How do repositories work?

  29. 29

    How do I recursively remove temporary files containing ~ in git repositories

HotTag

Archive