DEV Community

Discussion on: 3 GIT productivity features explained

Collapse
 
chrispook profile image
Chris Pook • Edited

Thanks Sergiu,

When using git stash be aware that git stash pop will literally pop the stashed changes out of the storage, so you won't be able to pop it again later.

You may prefer to git stash list to see all your previously stashed states and then git stash apply stash@{X}(where X is the stash you want to pop back up).

This way the stashed code stays in the stash store as well as being applied, allowing you to later git stash apply again or git stash drop stash@{X} when you're definitely done.

Collapse
 
codevault profile image
Sergiu Mureşan

Thanks for the more in-depth explanation! I covered git stash apply a bit in the video but didn't explain about git stash drop.

One more useful feature I'd like to add, since we are expanding on this, is naming your stashes using git stash save "Name or message of the feature" since it can really get confusing with just the name of the commit you were working on.