git stash pop is like apply + drop as well. I think git stash --keep-index keeps everything staged, and stashes unstaged changes. Useful if it's hard to type the pathspec for multiple files, or if you want to stash some changes to a file but not all.
git stash
- e.g.git stash .
orgit stash src/index.js
. Thengit stash apply
to apply the stashed changes orgit stash drop
to discard them.Is that what you're looking for?
git stash pop
is like apply + drop as well. I thinkgit stash --keep-index
keeps everything staged, and stashes unstaged changes. Useful if it's hard to type the pathspec for multiple files, or if you want to stash some changes to a file but not all.Big fan of
git stash pop
. Definitely a1 command > 2 commands
scenario.Whoa, TIL. Git's pretty cool, isn't it