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:
- Is this the best way to resolve the problem, or is there a more intuitive fashion -- ideally one that doesn't make me worry I'm about to throw away stashed changes?
- If this is the best way, is there any way to do a stash drop in TortoiseGit? I appreciate having GUI tools showing me what differences I'm merging/discarding, and so try to avoid reverting to the command line with git.