Skip to content

empty-repo

branch

freshly-initialized repo, no commits, no files, no remotes

A `git init`'d repo on `main` with zero commits. HEAD is unborn.
Working tree empty. No remotes, tags, or stashes.

Useful for testing:
  - log / history views when there's no HEAD to resolve
  - branch / tag / stash views when the underlying lists are empty
  - status view distinguishing "no commits yet" from "clean worktree"
  - the "create your first commit" affordance / empty-state copy

Setup is a no-op because `createTempGitRepo` already produces this
state; the scenario exists so consumers can name and target it via
the registry alongside the rest.
  • HEAD is unborn (no commits)
  • main is the current branch
  • working tree is empty
  • no remotes configured
  • no tags
  • no stashes
emptyedge-caseunborn
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('empty-repo')

No commits — this scenario starts with an unborn HEAD.

Back to Scenario Browser