After `git stash pop` you got conflicts. Is your stash lost?
IntermediateScenarioUndoing Mistakes
Answer
Situation read → When pop conflicts, Git keeps the stash entry instead of dropping it.
What I'd do →
git statusto see conflicted files and resolve them like a merge.git addthe resolved files, thengit resetto unstage if you want them as plain changes.- Drop the stash only when satisfied:
git stash drop. - To retry on a clean tree:
git checkout . && git stash pop.
Why → Pop = apply + drop, but drop is skipped on failure, which protects you.
Interview tip → Prefer git stash apply for risky cases; drop manually after verifying.
More on Undoing Mistakes
You committed on `main` when you meant to be on a feature branch. Nothing is pushed. Fix it.BeginnerYou made a typo in your last commit message and have not pushed.BeginnerA bad commit is already on shared `main`. Others have pulled it. How do you undo it?IntermediateYou ran `git reset --hard` and lost uncommitted-then-committed work. Can you get it back?IntermediateYou need to revert a merge commit on `main`. `git revert` says "commit is a merge but no -m option was given".IntermediateYou deleted a local branch with unmerged work by mistake.Beginner