Skip to content

stash-with-untracked

stash

one stash containing both modified tracked + untracked new files

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"
  • main has 2 commits
  • worktree is clean
  • git stash list reports 1 entry
  • the stash includes both modified tracked and untracked new files
stashuntrackedmixed-content
main
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('stash-with-untracked')
*-.   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

Back to Scenario Browser