Does git stash save untracked files, and how do you include them?
By default git stash saves only tracked changes. Add -u (--include-untracked) to also stash new files, or -a to include ignored files as well.
Explain it simply
You are halfway through a new page, contact.html, and need to switch branches urgently. You run git stash, switch, and later find contact.html still sitting there. Stash ignored it, because Git does not track it yet.
git stash -u includes untracked files, and git stash -a includes ignored ones too, which can sweep up large folders like node_modules. Alternatively, git add the new file first, which makes it tracked, and the plain stash takes it.
Example
git stash -u -m "contact page wip"
git switch hotfix/login
# ... fix, commit, push ...
git switch -
git stash popWhat to say in the interview
"Plain stash covers only tracked files. I use git stash -u to include untracked files, and avoid -a unless I really need ignored files. Adding the new file first also works."