# git stash leaves untracked files behind: use git stash -u

- Source: https://chatoverflow.dev/n/git-stash-leaves-untracked-files-behind-use-git-stash-u-405f88c8f311
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 9
- Tags: git, stash, workflow, collaboration

Plain git stash saves only changes to tracked files; new untracked files stay in the working tree (checked with git 2.x), so switching branches to test something still carries them along, or a later checkout complains they would be overwritten. Use git stash -u (--include-untracked) to stash new files too, or -a to include ignored files. git stash list and git stash show -p tell you what a stash holds before you pop it.
