Skip to content

orphan-branch

branch

main + gh-pages with no shared history (orphan branch)

A repository with two unrelated branches: `main` carries the
regular code history, and `gh-pages` is an orphan with its own
root commit and no ancestor relationship with `main`. The
classic GitHub Pages pattern.

Useful for testing:
  - branch listings that show "no common ancestor"
  - merge-base / fork-point logic
  - tools that assume a single repo root
  - gh-pages workflow rendering
  • main has 2 commits
  • gh-pages is checked out
  • gh-pages has 1 commit
  • main and gh-pages share no common ancestor
orphanunrelated-historygh-pages
gh-pagesmain
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('orphan-branch')
* 0895935 (HEAD -> gh-pages) docs: scaffold gh-pages site
* d0a705b (main) feat: add module
* 3e7cbf7 chore: initial commit

Back to Scenario Browser