Imagine that you are working on a part of a project and it starts getting messy. There has been an urgent bug that needs your immediate attention. ...
For further actions, you may consider blocking this person and/or reporting abuse
I have 1 stash item @{0}
What in the world is the correct syntax to drop it ?
I tried everything possible and impossible, everything is incorrect.
Just one WORKING example, please...
git stash drop stash@{0}
phew !
I wonder why did they not over complicate it even more:
git stash drop sT4Sh@#$%&(^___{oo)oo}}]]&%&^
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, replace0
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.
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.Thank you - now I see, GIT indeed is a tool for experts :)
I have couple of stash
stash@{0}
stash@{1}
stash@{2}
stash@{3}
Now I want my next commit to contain the changes of both stash@{1} and stash@{2} .
How can I apply multiple stash (except the top one i.e. stash@{0} ) ?
It was simple. Just applying both the stash
git stash apply stash@{1}
git stash apply stash@{2}
Just make sure that you don't have any changes in the same line
Thanks for the info!
git stash drop stash@{0}
Super complicated and verbose like everything "made-in-git"
Git is a tool for experts..=> crap
Great and clear explanation 👌