You stashed changes but your new, untracked files stayed behind.
BeginnerScenarioUndoing Mistakes
Answer
Situation read → Plain git stash saves only tracked changes.
What I'd do →
git stash push -u -m "wip: payment form"includes untracked files.- Add
-ato include ignored files too (rarely needed). - List with
git stash list, restore withgit stash pop.
Why → Untracked files are not in the index or HEAD, so they must be requested explicitly.
Interview tip → Always name stashes with -m. stash@{3} means nothing a week later.
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