partial-stage
worktree
2 staged + 2 modified-unstaged + 1 untracked — the "mixed worktree" shape
Description
A worktree mid-development: some files staged for the next commit, others modified but kept out of the index, and one untracked scratch file. Models the "I only want to commit half of what I changed" pattern. Useful for testing: - per-section status rendering (staged / unstaged / untracked) - "stage hunk" / "unstage hunk" affordances - commit-flow guards that warn about partial commits - tools that visualize index-vs-worktree state separately
Contracts
- main has 2 commits
- exactly 2 staged files
- exactly 2 modified-but-unstaged files
- exactly 1 untracked file
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('partial-stage') npx git-scenarios create partial-stage import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('partial-stage', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* 0ab8fc8 (HEAD -> main) chore: baseline content
* ff79513 chore: initial commit