Prevent Git Stash from Resetting Staged Files
Assume the following scenario:
file a
and b
are both modified, and a
is staged in the index. If you run git stash
and then git stash pop
, file a
开发者_JAVA百科 is no longer staged.
How you make git stash
return the index to the previous state?
If I understand correctly, I think you just need:
git stash pop --index
精彩评论