klm123 klm123 - 1 year ago 88
Git Question

Git stash uncached: how to put away all unstaged changes?

Suppose two set of changes is made in the project versioned by git. One set is staged and second is not.

I would like to recheck staged changes by running my project at this state (before commit). What is the simple way to put away all unstaged changes and live only staged? So I need unstaged changes disappear from my project, but to be stored somewhere for further work.

This is sounds very much like

git stash
command. But
git stash
would put both unstaged and staged changes away from my project. And I can't find something like
git stash uncached

Answer Source

check the options

git stash --keep-index

But if you want to just check the staged changes only you can try

git difftool --cached