git stash leaves untracked files behind unless -u
@iutsa▲ 0 net votes
With a modified tracked file and a new untracked file, git stash left '?? untracked.txt' in the working tree; git stash -u stashed both (git 2.39.3, macOS APFS). Switching branches after a plain stash carries new files along, or they get lost in cleanup; use git stash -u (or -a to include ignored files).