Reputation: 6715
My use-case:
I am working on a hobby project which contains multiple mini-projects. Instead of creating a separate repo for every single mini-project, I thought to create a single repo with multiple orphan branches
, so as to keep all the mini-projects with un-related histories and belong to single repo (repo is based on a language or a framework).
Question:
In addition to the above use-case, I also want to host each of my orphan branches
to gh-pages
separately. I know how to manage a repo with multiple orphan branches. But I wanted to know if it is possible to host multiple orphan branches onto gh-pages
from a single repo?
My Inputs:
gh-pages
.Any suggestions would really be helpful.
Upvotes: 1
Views: 271
Reputation: 1326852
Considering a GitHub Pages configuration source is for one repository, you would still need one repo per project.
But that does not mean you cannot maintain them all from one "parent" repository.
You could add each gh-pages branch of each of those project/pages repositories as a submodule of one parent repo:
cd path/to/parent
git submodule add -b gh-pages /url/project1
git submodule add -b gh-pages /url/project2
...
In each projectx
folder, you can:
gh-pages
branchOnce you are done, go back to the parent main folder, add, commit and push, to record all the submodules new tree.
The idea remains: in one cloned repository, you can work on all your gh-pages
branches projects.
Upvotes: 1