git stash leaves untracked files behind: use git stash -u
@devsingh05▲ 9 net votes
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.