I am using TortoiseGit to work with a repository with a remote origin. I frequently have to stop in the middle of one change to work on another, so I use the stash feature to cordon off development I'm putting on hold, make more immediate changes, commit those, push, and then return to my stash.
Over time, this resulted in several stashed changes, all of which I was attempting to pop off at once.
The first couple of stash pops worked fine. Did a stash pop, committed, and repeated. However, one of the last ones resulted in the error message "Stash POP Fail!!!" (OMG! Three exclamation points!!!) The text below the error indicated one of the files I was attempting to pop had a merge conflict.
I did what I do when I get a conflict after a pull: I made edits to the conflicting file to fix the issues, told git that I had resolved the conflict, and finally committed the change.
Doing another stash pop, however, resulted in the same error, and attempting to resolve the differences showed that git was attempting to pull the same changes out of the stash as before. When I resolved the conflict a second time and attempted to commit, git informed me nothing had changed, and so there was nothing to commit.
Ultimately, to get past this issue (and get to the further-down stashes), I located this somewhat similar problem on SO and took the advice all the way at the bottom of the accepted answer. I opened up a git bash prompt and did a git stash drop to remove the stash that was causing the issue.
My questions are:
If you are worried about dropping a stash with changes you want to keep, you can diff it against your current working directory with:
From tortoise: shift->"right click"->"stash list" and "Compare with working copy"
From command line: git stash show -p
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With