projetmbc
projetmbc

Reputation: 1452

Put different git projects in the same folder

Locally I have several projects, typically books, in the same folder using the following folder tree.

  + books
  + book_1
     * .git
     * ... etc
  + book_2
     * .git
     * ... etc

Is it possible to keep this organization locally by using a master books repository in the github website ?

Upvotes: 1

Views: 152

Answers (1)

VonC
VonC

Reputation: 1323403

You can if you have a books repo in GitHub, in which you can push git submodules (one for each project).
Each project is in its own GitHub repo.

It means locally that you have a books repo, in which you can do a

git submodule add -- https://<username>@github.com/<username>/book_1
git submodule add -- https://<username>@github.com/<username>/book_2
...

Then a simple git clone --recursive https://<username>@github.com/<username>/books will clone books and all submodules.

Upvotes: 1

Related Questions