DEV Community

Discussion on: How to Git Stash Your Work [the Correct Way]

Collapse
 
nefira profile image
Nefira

Hello Peter,

Might depend on your version of git, but I think you could use a simpler command such as :

git stash drop 0 (in your precise case, otherwise, replace 0 by the stash id.

This is in fact what is written in the article, but either it wasn't easy to understand without an example, or you have some special configuration of git ? On my machine at least, it works.

Thread Thread
 
nefira profile image
Nefira

I should even add that if you want to delete the last created stash (stash@{0}), you could even just type : git stash drop. But again, that is assuming that you have a default git configuration (I am not too familiar with all the configuration options available). Hope that helps.

Thread Thread
 
peterhric profile image
Peter Hric

Thank you - now I see, GIT indeed is a tool for experts :)