empty-repo
branch
freshly-initialized repo, no commits, no files, no remotes
Description
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.
Contracts
- HEAD is unborn (no commits)
- main is the current branch
- working tree is empty
- no remotes configured
- no tags
- no stashes
Tags
Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('empty-repo') npx git-scenarios create empty-repo import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('empty-repo', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
No commits — this scenario starts with an unborn HEAD.