1

Branches in git repos or similar are practically always derived from the same code base; after all, they're usually merged back in to master later.

But, if you wanted your open source project on GitHub to have a website, you could use GitHub Pages, which lets you publish a site in a repo on a branch named gh-pages. Unless said open source project is a frontend web app, gh-pages will by necessity not be based on master.

Are there any other scenarios where you would want to maintain different branches in the same repo that have completely different code bases or histories?

closed as too broad by user40980, durron597, user53019, Bart van Ingen Schenau, JB King Nov 4 '15 at 22:55

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    It's one of the few things where I think GitHub chose a bad solution. A separate pages repo would be so much cleaner. Why should I bloat a nice small code repo with images and html? It makes no sense. – Wilbert Oct 26 '15 at 14:19
  • I just use headless/orphan branches, which don't share a parent with master: git checkout --orphan gh-pages. Displays fine on github too. – MaulingMonkey Nov 9 '15 at 17:37
  • @MaulingMonkey That's a thing? – JesseTG Nov 9 '15 at 20:57
  • Also, the lack of answers, while probably a bad thing normally, speaks volumes here. Here, a lack of answers just means "no". – JesseTG Nov 9 '15 at 20:58