Git stash can sometimes be very useful, specially because we can't switch branches with modified files around.
Another way is to simply type git stash, it will put everything in the stash with a WIP message automatically. Then you can do git stash pop to pop the last added entry to the stash (:
Git stash can sometimes be very useful, specially because we can't switch branches with modified files around.
Another way is to simply type
git stash
, it will put everything in the stash with a WIP message automatically. Then you can dogit stash pop
to pop the last added entry to the stash (:You are correct. But, when we have multiple stash and If one would like to apply the stash which is in the middle, then pop doesn't solve it.
From git version 2.11 you can do
git stash pop stash@{n}
, or even betteryou can just use index instead stash@{n} like
git stash pop n
.Or when we want to stash specific files, we can't simply
git stash
too, as it will stash everything!Yesss!