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 master
branch and I've created a feature branch called profiles
where I'm doing some specific work to profiles. While working on profiles I've changed 5 or 6 files and added another 5 or 6 new files. I needed to switch back to the master
branch to fix a quick bug and noticed all the new files and modified files where in there as well. I guess this makes sense since git isnt going to remove untracked files from the master
branch and bring them back for my profiles
branch since they are, in fact, untracked. But what about the changes to existing files. Why are they showing up in the master branch.
Whats the best practice here. I'm not ready to commit the changes locally yet. Should I just be stashing all these changes, switch to master
, make the small fix, switch back to profiles
then reapply the stash?
Any help is appreciated. Thanks