If you do not want to specify a message with your stashed changes, pass the filename after a double-dash.
$ git stash -- filename.ext
If it’s an untracked/new file, you will have to stage it first.
However, if you do want to specify a message, use push
.
git stash push -m "describe changes to filename.ext" filename.ext
Both methods work in git versions 2.13+