Yes, It’s possible with DOUBLE STASH
- Stage all your files that you need to stash.
- Run
git stash --keep-index. This command will create a stash with ALL of your changes (staged and unstaged), but will leave the staged changes in your working directory (still in state staged). - Run
git stash push -m "good stash" - Now your
"good stash"has ONLY staged files.
Now if you need unstaged files before stash, simply apply first stash (the one created with --keep-index) and now you can remove files you stashed to "good stash".
Enjoy