stash-with-untracked
stash
one stash containing both modified tracked + untracked new files
Description
A clean worktree on `main` with a single stash entry that was created with `--include-untracked`. The stash mixes a modification to an existing tracked file (`src/feature.ts`) with a brand-new untracked file (`src/new-feature.ts`) — the realistic shape of "I want to set my work aside and pick it up later" when that work includes scaffolding new files. Useful for testing: - stash list rendering when entries contain new files - apply / pop flows that have to recreate untracked content - tools that highlight "stash includes N untracked files"
Contracts
- main has 2 commits
- worktree is clean
- git stash list reports 1 entry
- the stash includes both modified tracked and untracked new files
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('stash-with-untracked') npx git-scenarios create stash-with-untracked import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('stash-with-untracked', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
*-. 5b6e7cc (refs/stash) On main: WIP: feature v2 + new-feature scaffolding
|\ \
| | * b27d53a untracked files on main: 44f2eaf feat: baseline feature
| * 8c19173 index on main: 44f2eaf feat: baseline feature
|/
* 44f2eaf (HEAD -> main) feat: baseline feature
* c3cfc31 chore: initial scaffold