I\'ve been searching around here for to look for an answer and it seems I may just be making incorrect assumptions on how git branches are supposed to work.
I have my
They're not showing up in the master branch - if you did a hard reset and a clean, they'd disappear. Git is merely preserving your local modifications when you switch branches.
This is commonly useful; you might have realized you want to commit those modifications to a different branch than the one you're currently on. If the modifications conflicted with the difference between the two branches, git would refuse to switch branches.
You're right about the best approach, though - switching branches cleanly is in my experience one of the most common uses of git stash
.