If you do not want to indicate a message with your hidden changes, pass the file name after the double dash.
$ git stash -- filename.ext
If it is an untracked / new file, you will have to post it first.
However, if you want to specify a message, use push .
git stash push -m "describe changes to filename.ext" filename.ext
Both methods work in git version 2. 13+
sealocal Mar 09 '19 at 3:59 2019-03-09 03:59
source share