orphan-branch
branch
main + gh-pages with no shared history (orphan branch)
Description
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
Contracts
- main has 2 commits
- gh-pages is checked out
- gh-pages has 1 commit
- main and gh-pages share no common ancestor
Tags
Branches
gh-pagesmain Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('orphan-branch') npx git-scenarios create orphan-branch import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('orphan-branch', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* 0895935 (HEAD -> gh-pages) docs: scaffold gh-pages site
* d0a705b (main) feat: add module
* 3e7cbf7 chore: initial commit