The staged changes end up in both the stage AND the stash. However what isn't obvious is that -keep-index also stashes the staged changes.
The accepted answer, and quite a few other answers, stashes the unstaged changes and leaves the stage alone as requested via -keep-index. Stashing just the working tree (unstaged changes) in Git is more difficult than it should be. Why not commit your changes after staging them? – ShinĪ: Because you should always checkin tested code :) That means, you need to run the tests with only the changes you are about to commitĪll this apart from the fact that of course, as an experienced programmer, you have the innate urge to test and review just those changes - only partly kidding Solution 5 Stash Without the Staged Changes The Problem with -keep-index / -k