The file that tagged along after you stashed

A brand-new file never makes it into the bag
A brand-new file never makes it into the bag

"I stashed everything, so why is my half-finished file on the other branch?" Ever seen that? A fresh file you just created stayed in the working tree and came along for the switch. If the other branch has a file with the same name, git switch may even refuse, to avoid overwriting it. Many engineers go through this at least once.

By default, git stash only takes files Git is already tracking. A brand-new file you haven't git add-ed yet stays where it is, ignored by the stash. Many people miss this and keep retrying stash, wondering why nothing changes.

The fix is just git stash -u (short for --include-untracked). It sweeps untracked files into the stash too. Make -u your default and you'll save the pain. One more tip. Have you ever looked at git stash list and thought "what was this one again?" Label each stash when you save it: git stash push -m "color tweak". The -m flag attaches a short note so future-you can tell them apart.